diff options
| author | JosJuice <josjuice@gmail.com> | 2022-09-24 13:03:45 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-09-24 13:03:45 +0200 |
| commit | 04072f0ce63c64924695743cd83a028c06fe6be2 (patch) | |
| tree | 358e1d8a5703ba1db7da09dbcbb1ee54929de98e /Source/Android/jni/Config/NativeConfig.cpp | |
| parent | 16c71b9a35dbe522d6d78406bf298dcd6a56f93f (diff) | |
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.
Diffstat (limited to 'Source/Android/jni/Config/NativeConfig.cpp')
| -rw-r--r-- | Source/Android/jni/Config/NativeConfig.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Android/jni/Config/NativeConfig.cpp b/Source/Android/jni/Config/NativeConfig.cpp index 4ec0d0bd86..f707e91f5b 100644 --- a/Source/Android/jni/Config/NativeConfig.cpp +++ b/Source/Android/jni/Config/NativeConfig.cpp @@ -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; |
