fix options menu reset to default logic getting executed when setting is already default (#461)

This commit is contained in:
ĐeäTh 2025-02-24 17:17:47 +01:00 committed by GitHub
parent 388a86e866
commit 0b16633ee1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -858,6 +858,8 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef<T>* conf
} }
if (g_canReset && padState.IsTapped(SWA::eKeyState_X)) if (g_canReset && padState.IsTapped(SWA::eKeyState_X))
{
if (!config->IsDefaultValue())
{ {
config->MakeDefault(); config->MakeDefault();
@ -869,6 +871,7 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef<T>* conf
if (config->ApplyCallback) if (config->ApplyCallback)
config->ApplyCallback(config); config->ApplyCallback(config);
}
Game_PlaySound("sys_worldmap_decide"); Game_PlaySound("sys_worldmap_decide");
} }