mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Save mouse and joystick analog scales, dead zones, and saturation values to .cfg whether they're the defaults or not
This fixes an issue where changing one of these values would result in the value being written to the .cfg, but changing the value back to the default would leave the old value in the .cfg. git-svn-id: https://svn.eduke32.com/eduke32@7341 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e74cad12ad
commit
eef6667fbc
1 changed files with 8 additions and 20 deletions
|
@ -835,13 +835,10 @@ void CONFIG_WriteSetup(uint32_t flags)
|
|||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[i][1]));
|
||||
}
|
||||
|
||||
if (ud.config.MouseAnalogueScale[i] != DEFAULTMOUSEANALOGUESCALE)
|
||||
{
|
||||
Bsprintf(buf, "MouseAnalogScale%d", i);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[i], FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ud.setup.usejoystick)
|
||||
{
|
||||
|
@ -879,25 +876,16 @@ void CONFIG_WriteSetup(uint32_t flags)
|
|||
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]));
|
||||
}
|
||||
|
||||
if (ud.config.JoystickAnalogueScale[dummy] != DEFAULTJOYSTICKANALOGUESCALE)
|
||||
{
|
||||
Bsprintf(buf, "JoystickAnalogScale%d", dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueScale[dummy], FALSE, FALSE);
|
||||
}
|
||||
|
||||
if (ud.config.JoystickAnalogueDead[dummy] != DEFAULTJOYSTICKANALOGUEDEAD)
|
||||
{
|
||||
Bsprintf(buf, "JoystickAnalogDead%d", dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueDead[dummy], FALSE, FALSE);
|
||||
}
|
||||
|
||||
if (ud.config.JoystickAnalogueSaturate[dummy] != DEFAULTJOYSTICKANALOGUESATURATE)
|
||||
{
|
||||
Bsprintf(buf, "JoystickAnalogSaturate%d", dummy);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","PlayerName",&szPlayerName[0]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue