mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-22 20:20:15 -06:00
fix options menu reset to default logic getting executed when setting is already default (#461)
This commit is contained in:
@@ -859,16 +859,19 @@ 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))
|
||||||
{
|
{
|
||||||
config->MakeDefault();
|
if (!config->IsDefaultValue())
|
||||||
|
{
|
||||||
|
config->MakeDefault();
|
||||||
|
|
||||||
VideoConfigValueChangedCallback(config);
|
VideoConfigValueChangedCallback(config);
|
||||||
XAudioConfigValueChangedCallback(config);
|
XAudioConfigValueChangedCallback(config);
|
||||||
|
|
||||||
if (config->Callback)
|
if (config->Callback)
|
||||||
config->Callback(config);
|
config->Callback(config);
|
||||||
|
|
||||||
if (config->ApplyCallback)
|
if (config->ApplyCallback)
|
||||||
config->ApplyCallback(config);
|
config->ApplyCallback(config);
|
||||||
|
}
|
||||||
|
|
||||||
Game_PlaySound("sys_worldmap_decide");
|
Game_PlaySound("sys_worldmap_decide");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user