forked from Ports/perfect_dark
Prevent Combat Simulator 'Load Settings' clobber
This commit is contained in:
3 files changed
+8
-6
No files matched your search
@@ -601,7 +601,7 @@ void mpInit(bool resetplayers)
|
|||||||
g_MpSetup.chrslots = 0;
|
g_MpSetup.chrslots = 0;
|
||||||
|
|
||||||
for (i = 0; i < ARRAYCOUNT(g_Menus); i++) {
|
for (i = 0; i < ARRAYCOUNT(g_Menus); i++) {
|
||||||
g_Menus[i].mpsetup.showpresets = 1;
|
g_Menus[i].mpsetupext.showpresets = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PLATFORM_N64
|
#ifndef PLATFORM_N64
|
||||||
|
|||||||
@@ -2258,7 +2258,7 @@ MenuItemHandlerResult mpPlayerNameMenuHandler(s32 operation, struct menuitem *it
|
|||||||
|
|
||||||
MenuItemHandlerResult mpLoadSettingsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
|
MenuItemHandlerResult mpLoadSettingsMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||||
{
|
{
|
||||||
u8 presets = g_Menus[g_MpPlayerNum].mpsetup.showpresets;
|
u8 presets = g_Menus[g_MpPlayerNum].mpsetupext.showpresets;
|
||||||
s32 numpresets = mpGetNumUnlockedPresets()*presets;
|
s32 numpresets = mpGetNumUnlockedPresets()*presets;
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
@@ -2568,8 +2568,8 @@ MenuDialogHandlerResult mpLoadSettingsDialogHandler(s32 operation, struct menudi
|
|||||||
{
|
{
|
||||||
if (operation == MENUOP_TICK) {
|
if (operation == MENUOP_TICK) {
|
||||||
if (menuAltAnyPressed(g_MpPlayerNum)) {
|
if (menuAltAnyPressed(g_MpPlayerNum)) {
|
||||||
u8 presets = g_Menus[g_MpPlayerNum].mpsetup.showpresets;
|
u8 presets = g_Menus[g_MpPlayerNum].mpsetupext.showpresets;
|
||||||
g_Menus[g_MpPlayerNum].mpsetup.showpresets = 1 - presets;
|
g_Menus[g_MpPlayerNum].mpsetupext.showpresets = 1 - presets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -3777,8 +3777,9 @@ struct menudata_mpsetup {
|
|||||||
u32 slotindex;
|
u32 slotindex;
|
||||||
u32 slotcount;
|
u32 slotcount;
|
||||||
u32 unke24;
|
u32 unke24;
|
||||||
u32 unke28;
|
};
|
||||||
u32 unke2c;
|
|
||||||
|
struct menudata_mpsetup_ext {
|
||||||
u8 showpresets;
|
u8 showpresets;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3995,6 +3996,7 @@ struct menu {
|
|||||||
struct menudata_mpsetup mpsetup;
|
struct menudata_mpsetup mpsetup;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct menudata_mpsetup_ext mpsetupext;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gamefile {
|
struct gamefile {
|
||||||
|
|||||||
Reference in new issue
Block a user