mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
fix options menu reset to default logic getting executed when setting is already default (#461)
This commit is contained in:
parent
388a86e866
commit
0b16633ee1
1 changed files with 10 additions and 7 deletions
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue