X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fprofile.cpp;h=cbb12f47efc7da55c697c34649cb9c573a68e1a1;hb=77430278bc7300a9ad84bdc2e40615c1d510dc78;hp=a4d8e57141661974025670a7b769047cadb1e54e;hpb=d45cbbf10d32c4b44a924e19b0f4ee2fbe51b46c;p=virtualjaguar diff --git a/src/gui/profile.cpp b/src/gui/profile.cpp index a4d8e57..cbb12f4 100644 --- a/src/gui/profile.cpp +++ b/src/gui/profile.cpp @@ -49,6 +49,7 @@ int gamepadIDSlot2; int numberOfProfiles; int numberOfDevices; char deviceNames[MAX_DEVICES][128]; +static int numberOfProfilesSave; // This is so that new devices have something reasonable to show for default uint32_t defaultMap[21] = { @@ -68,6 +69,7 @@ int FindProfileForDevice(int deviceNum, int preferred, int * found); // void SaveProfiles(void) { + numberOfProfilesSave = numberOfProfiles; memcpy(&profileBackup, &profile, sizeof(Profile) * MAX_PROFILES); } @@ -75,6 +77,7 @@ void SaveProfiles(void) void RestoreProfiles(void) { memcpy(&profile, &profileBackup, sizeof(Profile) * MAX_PROFILES); + numberOfProfiles = numberOfProfilesSave; } @@ -357,7 +360,7 @@ One more stab at this... */ void AutoConnectProfiles(void) { - int foundProfiles[MAX_PROFILES]; +// int foundProfiles[MAX_PROFILES]; controller1Profile = -1; controller2Profile = -1; gamepadIDSlot1 = -1;