mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-27 08:45:38 +00:00
Fixed an issue where an invalid UIMode entry in es_settings.xml could lead to a crash.
This commit is contained in:
parent
cdf0227ad4
commit
46228c6a9d
|
@ -39,6 +39,12 @@ UIModeController::UIModeController()
|
||||||
{
|
{
|
||||||
mPassKeySequence = Settings::getInstance()->getString("UIMode_passkey");
|
mPassKeySequence = Settings::getInstance()->getString("UIMode_passkey");
|
||||||
mCurrentUIMode = Settings::getInstance()->getString("UIMode");
|
mCurrentUIMode = Settings::getInstance()->getString("UIMode");
|
||||||
|
// Handle a potentially invalid entry in the configuration file.
|
||||||
|
if (mCurrentUIMode != "full" && mCurrentUIMode != "kid" && mCurrentUIMode != "kiosk") {
|
||||||
|
mCurrentUIMode = "full";
|
||||||
|
Settings::getInstance()->setString("UIMode", mCurrentUIMode);
|
||||||
|
Settings::getInstance()->saveFile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIModeController::monitorUIMode()
|
void UIModeController::monitorUIMode()
|
||||||
|
|
Loading…
Reference in a new issue