mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Bump PROFILEVER, old profiles are converted and have Lite Steer turned off
- Prints a message in the log file Profile 'PRFA' was converted from version 1 to version 2
This commit is contained in:
parent
70b56bf973
commit
a3a1579875
2 changed files with 19 additions and 1 deletions
|
|
@ -412,6 +412,7 @@ void PR_LoadProfiles(void)
|
|||
|
||||
for (size_t i = 1; i < numprofiles; i++)
|
||||
{
|
||||
bool converted = false;
|
||||
auto& jsprof = js.profiles[i - 1];
|
||||
profile_t* newprof = static_cast<profile_t*>(Z_Calloc(sizeof(profile_t), PU_STATIC, NULL));
|
||||
profilesList[i] = newprof;
|
||||
|
|
@ -467,6 +468,13 @@ void PR_LoadProfiles(void)
|
|||
newprof->rumble = jsprof.preferences.rumble;
|
||||
newprof->fov = jsprof.preferences.fov;
|
||||
|
||||
if (jsprof.version == 1)
|
||||
{
|
||||
// Version 1 -> 2: litesteer is now off by default, reset old profiles
|
||||
newprof->litesteer = false;
|
||||
converted = true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
for (size_t j = 0; j < num_gamecontrols; j++)
|
||||
|
|
@ -482,6 +490,12 @@ void PR_LoadProfiles(void)
|
|||
I_Error("Profile '%s' controls are corrupt", jsprof.playername.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (converted)
|
||||
{
|
||||
CONS_Printf("Profile '%s' was converted from version %d to version %d\n",
|
||||
newprof->profilename, jsprof.version, PROFILEVER);
|
||||
}
|
||||
}
|
||||
|
||||
profilesList[PROFILE_GUEST] = dprofile;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,11 @@ extern "C" {
|
|||
#define SKINNAMESIZE 16
|
||||
|
||||
#define PROFILENAMELEN 6
|
||||
#define PROFILEVER 1
|
||||
// Version history:
|
||||
// 1 - first
|
||||
// 2 - litesteer is off by default, old profiles litesteer
|
||||
// option is reset to default
|
||||
#define PROFILEVER 2
|
||||
#define MAXPROFILES 16
|
||||
#define PROFILESFILE "ringprofiles.prf"
|
||||
#define PROFILE_GUEST 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue