Integrate "Ignore for this session" better with config system

Because of the previous commit, this is needed to stop DolphinQt from
forgetting that the user pressed ignore whenever any part of the config
is changed.

This commit also changes the behavior a bit on DolphinQt: "Ignore for
this session" now applies to the current emulation session instead of
the current Dolphin launch. This matches how it already worked on
Android, and is in my opinion better because it means the user won't
lose out on important panic alerts in a game becase they played another
game first that had repeated panic alerts that they wanted to ignore.

For Android, this commit isn't necessary, but it makes the code cleaner.
This commit is contained in:
JosJuice
2022-09-24 13:03:45 +02:00
parent 16c71b9a35
commit 04072f0ce6
9 changed files with 69 additions and 63 deletions

View File

@ -16,6 +16,7 @@ constexpr jint LAYER_BASE_OR_CURRENT = 0;
constexpr jint LAYER_BASE = 1;
constexpr jint LAYER_LOCAL_GAME = 2;
constexpr jint LAYER_ACTIVE = 3;
constexpr jint LAYER_CURRENT = 4;
static Config::Location GetLocation(JNIEnv* env, jstring file, jstring section, jstring key)
{
@ -76,6 +77,10 @@ static std::shared_ptr<Config::Layer> GetLayer(jint layer, const Config::Locatio
layer_type = Config::GetActiveLayerForConfig(location);
break;
case LAYER_CURRENT:
layer_type = Config::LayerType::CurrentRun;
break;
default:
ASSERT(false);
return nullptr;