mirror of https://github.com/snes9xgit/snes9x.git
New menu structure
This commit is contained in:
parent
270cd4fe06
commit
59f68745be
|
@ -830,26 +830,26 @@ BEGIN
|
|||
POPUP "&Save Game Position"
|
||||
BEGIN
|
||||
MENUITEM "Slot #&1", ID_FILE_SAVE1
|
||||
MENUITEM "Slot #&2", ID_FILE_SAVE2, GRAYED
|
||||
MENUITEM "Slot #&3", ID_FILE_SAVE3, GRAYED
|
||||
MENUITEM "Slot #&4", ID_FILE_SAVE4, GRAYED
|
||||
MENUITEM "Slot #&5", ID_FILE_SAVE5, GRAYED
|
||||
MENUITEM "Slot #&6", ID_FILE_SAVE6, GRAYED
|
||||
MENUITEM "Slot #&7", ID_FILE_SAVE7, GRAYED
|
||||
MENUITEM "Slot #&8", ID_FILE_SAVE8, GRAYED
|
||||
MENUITEM "Slot #&9", ID_FILE_SAVE9, GRAYED
|
||||
MENUITEM "Slot #&2", ID_FILE_SAVE2
|
||||
MENUITEM "Slot #&3", ID_FILE_SAVE3
|
||||
MENUITEM "Slot #&4", ID_FILE_SAVE4
|
||||
MENUITEM "Slot #&5", ID_FILE_SAVE5
|
||||
MENUITEM "Slot #&6", ID_FILE_SAVE6
|
||||
MENUITEM "Slot #&7", ID_FILE_SAVE7
|
||||
MENUITEM "Slot #&8", ID_FILE_SAVE8
|
||||
MENUITEM "Slot #&9", ID_FILE_SAVE9
|
||||
END
|
||||
POPUP "&Load Game Position"
|
||||
BEGIN
|
||||
MENUITEM "Slot #&1", ID_FILE_LOAD1
|
||||
MENUITEM "Slot #&2", ID_FILE_LOAD2, GRAYED
|
||||
MENUITEM "Slot #&3", ID_FILE_LOAD3, GRAYED
|
||||
MENUITEM "Slot #&4", ID_FILE_LOAD4, GRAYED
|
||||
MENUITEM "Slot #&5", ID_FILE_LOAD5, GRAYED
|
||||
MENUITEM "Slot #&6", ID_FILE_LOAD6, GRAYED
|
||||
MENUITEM "Slot #&7", ID_FILE_LOAD7, GRAYED
|
||||
MENUITEM "Slot #&8", ID_FILE_LOAD8, GRAYED
|
||||
MENUITEM "Slot #&9", ID_FILE_LOAD9, GRAYED
|
||||
MENUITEM "Slot #&2", ID_FILE_LOAD2
|
||||
MENUITEM "Slot #&3", ID_FILE_LOAD3
|
||||
MENUITEM "Slot #&4", ID_FILE_LOAD4
|
||||
MENUITEM "Slot #&5", ID_FILE_LOAD5
|
||||
MENUITEM "Slot #&6", ID_FILE_LOAD6
|
||||
MENUITEM "Slot #&7", ID_FILE_LOAD7
|
||||
MENUITEM "Slot #&8", ID_FILE_LOAD8
|
||||
MENUITEM "Slot #&9", ID_FILE_LOAD9
|
||||
END
|
||||
MENUITEM "Load MultiCart...", ID_FILE_LOADMULTICART
|
||||
MENUITEM SEPARATOR
|
||||
|
@ -857,24 +857,25 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "S&ave SPC Data", ID_FILE_SAVE_SPC_DATA
|
||||
MENUITEM "Save Screenshot", ID_SAVESCREENSHOT
|
||||
MENUITEM "Sa&ve S-RAM Data", ID_FILE_SAVE_SRAM_DATA, GRAYED
|
||||
MENUITEM "Sa&ve S-RAM Data", ID_FILE_SAVE_SRAM_DATA
|
||||
END
|
||||
MENUITEM "ROM Information...", IDM_ROM_INFO, GRAYED
|
||||
MENUITEM "ROM Information...", IDM_ROM_INFO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Movie Play...", ID_FILE_MOVIE_PLAY, GRAYED
|
||||
MENUITEM "Movie Record...", ID_FILE_MOVIE_RECORD, GRAYED
|
||||
MENUITEM "Movie Stop", ID_FILE_MOVIE_STOP, GRAYED
|
||||
MENUITEM "Movie Play...", ID_FILE_MOVIE_PLAY
|
||||
MENUITEM "Movie Record...", ID_FILE_MOVIE_RECORD
|
||||
MENUITEM "Movie Stop", ID_FILE_MOVIE_STOP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "AVI Recording", ID_FILE_AVI_RECORDING, GRAYED
|
||||
MENUITEM "AVI Recording", ID_FILE_AVI_RECORDING
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Reset Game", ID_FILE_RESET, GRAYED
|
||||
MENUITEM "&Pause", ID_FILE_PAUSE, GRAYED
|
||||
MENUITEM "&Reset Game", ID_FILE_RESET
|
||||
MENUITEM "E&xit\tAlt+F4", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Options"
|
||||
POPUP "&Emulation"
|
||||
BEGIN
|
||||
MENUITEM "&Display Configuration...\tAlt+F5", ID_OPTIONS_DISPLAY
|
||||
MENUITEM "&Settings...\tAlt+F8", ID_OPTIONS_SETTINGS
|
||||
MENUITEM "&Pause", ID_FILE_PAUSE
|
||||
MENUITEM "Pause &When Inactive", ID_SOUND_48MS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Se&ttings...\tAlt+F8", ID_OPTIONS_SETTINGS
|
||||
END
|
||||
POPUP "&Input"
|
||||
BEGIN
|
||||
|
@ -895,31 +896,31 @@ BEGIN
|
|||
POPUP "&Playback Rate"
|
||||
BEGIN
|
||||
MENUITEM "&Mute Sound", ID_SOUND_NOSOUND
|
||||
MENUITEM "8KHz", ID_SOUND_8000HZ, GRAYED
|
||||
MENUITEM "11KHz", ID_SOUND_11025HZ, GRAYED
|
||||
MENUITEM "16KHz", ID_SOUND_16000HZ, GRAYED
|
||||
MENUITEM "22KHz", ID_SOUND_22050HZ, GRAYED
|
||||
MENUITEM "30KHz", ID_SOUND_30000HZ, GRAYED
|
||||
MENUITEM "32KHz (SNES)", ID_SOUND_32000HZ, GRAYED
|
||||
MENUITEM "35KHz", ID_SOUND_35000HZ, GRAYED
|
||||
MENUITEM "44KHz", ID_SOUND_44100HZ, GRAYED
|
||||
MENUITEM "48KHz", ID_SOUND_48000HZ, GRAYED
|
||||
MENUITEM "8KHz", ID_SOUND_8000HZ
|
||||
MENUITEM "11KHz", ID_SOUND_11025HZ
|
||||
MENUITEM "16KHz", ID_SOUND_16000HZ
|
||||
MENUITEM "22KHz", ID_SOUND_22050HZ
|
||||
MENUITEM "30KHz", ID_SOUND_30000HZ
|
||||
MENUITEM "32KHz (SNES)", ID_SOUND_32000HZ
|
||||
MENUITEM "35KHz", ID_SOUND_35000HZ
|
||||
MENUITEM "44KHz", ID_SOUND_44100HZ
|
||||
MENUITEM "48KHz", ID_SOUND_48000HZ
|
||||
END
|
||||
POPUP "&Buffer Length"
|
||||
BEGIN
|
||||
MENUITEM "16ms", ID_SOUND_16MS
|
||||
MENUITEM "32ms", ID_SOUND_32MS, GRAYED
|
||||
MENUITEM "48ms", ID_SOUND_48MS, GRAYED
|
||||
MENUITEM "64ms", ID_SOUND_64MS, GRAYED
|
||||
MENUITEM "80ms", ID_SOUND_80MS, GRAYED
|
||||
MENUITEM "96ms", ID_SOUND_96MS, GRAYED
|
||||
MENUITEM "112ms", ID_SOUND_112MS, GRAYED
|
||||
MENUITEM "128ms", ID_SOUND_128MS, GRAYED
|
||||
MENUITEM "144ms", ID_SOUND_144MS, GRAYED
|
||||
MENUITEM "160ms", ID_SOUND_160MS, GRAYED
|
||||
MENUITEM "176ms", ID_SOUND_176MS, GRAYED
|
||||
MENUITEM "194ms", ID_SOUND_194MS, GRAYED
|
||||
MENUITEM "210ms", ID_SOUND_210MS, GRAYED
|
||||
MENUITEM "32ms", ID_SOUND_32MS
|
||||
MENUITEM "48ms", ID_SOUND_48MS
|
||||
MENUITEM "64ms", ID_SOUND_64MS
|
||||
MENUITEM "80ms", ID_SOUND_80MS
|
||||
MENUITEM "96ms", ID_SOUND_96MS
|
||||
MENUITEM "112ms", ID_SOUND_112MS
|
||||
MENUITEM "128ms", ID_SOUND_128MS
|
||||
MENUITEM "144ms", ID_SOUND_144MS
|
||||
MENUITEM "160ms", ID_SOUND_160MS
|
||||
MENUITEM "176ms", ID_SOUND_176MS
|
||||
MENUITEM "194ms", ID_SOUND_194MS
|
||||
MENUITEM "210ms", ID_SOUND_210MS
|
||||
END
|
||||
POPUP "&Channels"
|
||||
BEGIN
|
||||
|
@ -941,20 +942,23 @@ BEGIN
|
|||
MENUITEM "S&ync Sound\tAlt+]", ID_SOUND_SYNC
|
||||
MENUITEM "&Settings...\tAlt+T", ID_SOUND_OPTIONS
|
||||
END
|
||||
POPUP "&Window"
|
||||
POPUP "&Video"
|
||||
BEGIN
|
||||
MENUITEM "&Hide menubar\tEsc", ID_WINDOW_HIDEMENUBAR
|
||||
MENUITEM "&Full Screen\tAlt+Enter", ID_WINDOW_FULLSCREEN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Stretch Image\tAlt+Backspace", 40032
|
||||
MENUITEM "&Maintain Aspect Ratio", 40123
|
||||
MENUITEM "&Bilinear Filtering", ID_WINDOW_VIDMEM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Display Configuration...\tAlt+F5", ID_OPTIONS_DISPLAY
|
||||
END
|
||||
POPUP "&Cheat"
|
||||
BEGIN
|
||||
MENUITEM "&Game Genie, Pro-Action Replay Codes\tAlt+E", ID_CHEAT_ENTER
|
||||
MENUITEM "&Search for New Cheats", ID_CHEAT_SEARCH_MODAL, GRAYED
|
||||
MENUITEM "Search for New Cheats (active)\tAlt+A", 40064, GRAYED
|
||||
MENUITEM "&Apply Cheats", ID_CHEAT_APPLY, CHECKED, GRAYED
|
||||
MENUITEM "&Search for New Cheats", ID_CHEAT_SEARCH_MODAL
|
||||
MENUITEM "Search for New Cheats (active)\tAlt+A", 40064
|
||||
MENUITEM "&Apply Cheats", ID_CHEAT_APPLY, CHECKED
|
||||
END
|
||||
POPUP "&Netplay"
|
||||
BEGIN
|
||||
|
@ -969,14 +973,6 @@ BEGIN
|
|||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Options...", ID_NETPLAY_OPTIONS
|
||||
END
|
||||
#ifdef DEBUGGER
|
||||
POPUP "&Debug"
|
||||
BEGIN
|
||||
MENUITEM "&Trace", ID_DEBUG_TRACE
|
||||
MENUITEM "&Frame Advance", ID_DEBUG_FRAME_ADVANCE
|
||||
MENUITEM "View SNES &Status", ID_DEBUG_SNES_STATUS
|
||||
END
|
||||
#endif
|
||||
POPUP "&Help"
|
||||
BEGIN
|
||||
MENUITEM "&About...", ID_HELP_ABOUT
|
||||
|
|
|
@ -2051,217 +2051,220 @@ LRESULT CALLBACK WinProc(
|
|||
RestoreSNESDisplay ();
|
||||
break;
|
||||
}
|
||||
case ID_WINDOW_FULLSCREEN:
|
||||
ToggleFullScreen ();
|
||||
break;
|
||||
case ID_WINDOW_STRETCH: {
|
||||
GUI.Stretch = !GUI.Stretch;
|
||||
if(!GUI.Stretch != !GUI.BilinearFilter) {
|
||||
GUI.BilinearFilter = !GUI.BilinearFilter;
|
||||
RestoreSNESDisplay ();
|
||||
}
|
||||
RECT rect;
|
||||
GetClientRect (GUI.hWnd, &rect);
|
||||
InvalidateRect (GUI.hWnd, &rect, true);
|
||||
} break;
|
||||
case ID_WINDOW_ASPECTRATIO: {
|
||||
GUI.AspectRatio = !GUI.AspectRatio;
|
||||
RECT rect;
|
||||
GetClientRect (GUI.hWnd, &rect);
|
||||
InvalidateRect (GUI.hWnd, &rect, true);
|
||||
} break;
|
||||
case ID_WINDOW_VIDMEM: {
|
||||
GUI.BilinearFilter = !GUI.BilinearFilter;
|
||||
RestoreSNESDisplay ();
|
||||
RECT rect;
|
||||
GetClientRect (GUI.hWnd, &rect);
|
||||
InvalidateRect (GUI.hWnd, &rect, true);
|
||||
} break;
|
||||
case ID_SAVESCREENSHOT:
|
||||
Settings.TakeScreenshot=true;
|
||||
break;
|
||||
case ID_FILE_SAVE_SPC_DATA:
|
||||
S9xDumpSPCSnapshot();
|
||||
S9xMessage(S9X_INFO, 0, INFO_SAVE_SPC);
|
||||
break;
|
||||
case ID_FILE_SAVE_SRAM_DATA: {
|
||||
bool8 success = Memory.SaveSRAM (S9xGetFilename (".srm", SRAM_DIR));
|
||||
if(!success)
|
||||
S9xMessage(S9X_ERROR, S9X_FREEZE_FILE_INFO, SRM_SAVE_FAILED);
|
||||
} break;
|
||||
case ID_FILE_RESET:
|
||||
case ID_WINDOW_FULLSCREEN:
|
||||
ToggleFullScreen ();
|
||||
break;
|
||||
case ID_WINDOW_STRETCH: {
|
||||
GUI.Stretch = !GUI.Stretch;
|
||||
if(!GUI.Stretch != !GUI.BilinearFilter) {
|
||||
GUI.BilinearFilter = !GUI.BilinearFilter;
|
||||
RestoreSNESDisplay ();
|
||||
}
|
||||
RECT rect;
|
||||
GetClientRect (GUI.hWnd, &rect);
|
||||
InvalidateRect (GUI.hWnd, &rect, true);
|
||||
} break;
|
||||
case ID_WINDOW_ASPECTRATIO: {
|
||||
GUI.AspectRatio = !GUI.AspectRatio;
|
||||
RECT rect;
|
||||
GetClientRect (GUI.hWnd, &rect);
|
||||
InvalidateRect (GUI.hWnd, &rect, true);
|
||||
} break;
|
||||
case ID_WINDOW_VIDMEM: {
|
||||
GUI.BilinearFilter = !GUI.BilinearFilter;
|
||||
RestoreSNESDisplay ();
|
||||
RECT rect;
|
||||
GetClientRect (GUI.hWnd, &rect);
|
||||
InvalidateRect (GUI.hWnd, &rect, true);
|
||||
} break;
|
||||
case ID_SAVESCREENSHOT:
|
||||
Settings.TakeScreenshot=true;
|
||||
break;
|
||||
case ID_FILE_SAVE_SPC_DATA:
|
||||
S9xDumpSPCSnapshot();
|
||||
S9xMessage(S9X_INFO, 0, INFO_SAVE_SPC);
|
||||
break;
|
||||
case ID_FILE_SAVE_SRAM_DATA: {
|
||||
bool8 success = Memory.SaveSRAM (S9xGetFilename (".srm", SRAM_DIR));
|
||||
if(!success)
|
||||
S9xMessage(S9X_ERROR, S9X_FREEZE_FILE_INFO, SRM_SAVE_FAILED);
|
||||
} break;
|
||||
case ID_FILE_RESET:
|
||||
#ifdef NETPLAY_SUPPORT
|
||||
if (Settings.NetPlayServer)
|
||||
{
|
||||
S9xNPReset ();
|
||||
ReInitSound();
|
||||
}
|
||||
else
|
||||
if (!Settings.NetPlay)
|
||||
if (Settings.NetPlayServer)
|
||||
{
|
||||
S9xNPReset ();
|
||||
ReInitSound();
|
||||
}
|
||||
else
|
||||
if (!Settings.NetPlay)
|
||||
#endif
|
||||
{
|
||||
S9xMovieUpdateOnReset ();
|
||||
if(S9xMoviePlaying())
|
||||
S9xMovieStop (TRUE);
|
||||
S9xSoftReset ();
|
||||
ReInitSound();
|
||||
}
|
||||
if(!S9xMovieRecording())
|
||||
Settings.Paused = false;
|
||||
break;
|
||||
case ID_FILE_PAUSE:
|
||||
Settings.Paused = !Settings.Paused;
|
||||
Settings.FrameAdvance = false;
|
||||
GUI.FrameAdvanceJustPressed = 0;
|
||||
break;
|
||||
case ID_FILE_LOAD1:
|
||||
FreezeUnfreeze (0, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD2:
|
||||
FreezeUnfreeze (1, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD3:
|
||||
FreezeUnfreeze (2, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD4:
|
||||
FreezeUnfreeze (3, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD5:
|
||||
FreezeUnfreeze (4, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD6:
|
||||
FreezeUnfreeze (5, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD7:
|
||||
FreezeUnfreeze (6, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD8:
|
||||
FreezeUnfreeze (7, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD9:
|
||||
FreezeUnfreeze (8, FALSE);
|
||||
break;
|
||||
case ID_FILE_SAVE1:
|
||||
FreezeUnfreeze (0, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE2:
|
||||
FreezeUnfreeze (1, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE3:
|
||||
FreezeUnfreeze (2, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE4:
|
||||
FreezeUnfreeze (3, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE5:
|
||||
FreezeUnfreeze (4, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE6:
|
||||
FreezeUnfreeze (5, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE7:
|
||||
FreezeUnfreeze (6, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE8:
|
||||
FreezeUnfreeze (7, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE9:
|
||||
FreezeUnfreeze (8, TRUE);
|
||||
break;
|
||||
case ID_CHEAT_ENTER:
|
||||
RestoreGUIDisplay ();
|
||||
S9xRemoveCheats ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEATER), hWnd, DlgCheater);
|
||||
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
|
||||
S9xApplyCheats ();
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_CHEAT_SEARCH:
|
||||
RestoreGUIDisplay ();
|
||||
if(!cheatSearchHWND) // create and show non-modal cheat search window
|
||||
{
|
||||
cheatSearchHWND = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), hWnd, DlgCheatSearch); // non-modal/modeless
|
||||
ShowWindow(cheatSearchHWND, SW_SHOW);
|
||||
}
|
||||
else // already open so just reactivate the window
|
||||
{
|
||||
SetActiveWindow(cheatSearchHWND);
|
||||
}
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_CHEAT_SEARCH_MODAL:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), hWnd, DlgCheatSearch); // modal
|
||||
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_CHEAT_APPLY:
|
||||
Settings.ApplyCheats = !Settings.ApplyCheats;
|
||||
if (!Settings.ApplyCheats){
|
||||
S9xRemoveCheats ();
|
||||
S9xMessage (S9X_INFO, S9X_GAME_GENIE_CODE_ERROR, CHEATS_INFO_DISABLED);
|
||||
}else{
|
||||
S9xApplyCheats ();
|
||||
bool on = false;
|
||||
extern struct SCheatData Cheat;
|
||||
for (uint32 i = 0; i < Cheat.num_cheats && !on; i++)
|
||||
if (Cheat.c [i].enabled)
|
||||
on = true;
|
||||
S9xMessage (S9X_INFO, S9X_GAME_GENIE_CODE_ERROR, on ? CHEATS_INFO_ENABLED : CHEATS_INFO_ENABLED_NONE);
|
||||
}
|
||||
break;
|
||||
case ID_OPTIONS_SETTINGS:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_EMU_SETTINGS), hWnd, DlgEmulatorProc);
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_HELP_ABOUT:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ABOUT), hWnd, DlgAboutProc);
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
{
|
||||
S9xMovieUpdateOnReset ();
|
||||
if(S9xMoviePlaying())
|
||||
S9xMovieStop (TRUE);
|
||||
S9xSoftReset ();
|
||||
ReInitSound();
|
||||
}
|
||||
if(!S9xMovieRecording())
|
||||
Settings.Paused = false;
|
||||
break;
|
||||
case ID_FILE_PAUSE:
|
||||
Settings.Paused = !Settings.Paused;
|
||||
Settings.FrameAdvance = false;
|
||||
GUI.FrameAdvanceJustPressed = 0;
|
||||
break;
|
||||
case ID_FILE_LOAD1:
|
||||
FreezeUnfreeze (0, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD2:
|
||||
FreezeUnfreeze (1, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD3:
|
||||
FreezeUnfreeze (2, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD4:
|
||||
FreezeUnfreeze (3, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD5:
|
||||
FreezeUnfreeze (4, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD6:
|
||||
FreezeUnfreeze (5, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD7:
|
||||
FreezeUnfreeze (6, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD8:
|
||||
FreezeUnfreeze (7, FALSE);
|
||||
break;
|
||||
case ID_FILE_LOAD9:
|
||||
FreezeUnfreeze (8, FALSE);
|
||||
break;
|
||||
case ID_FILE_SAVE1:
|
||||
FreezeUnfreeze (0, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE2:
|
||||
FreezeUnfreeze (1, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE3:
|
||||
FreezeUnfreeze (2, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE4:
|
||||
FreezeUnfreeze (3, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE5:
|
||||
FreezeUnfreeze (4, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE6:
|
||||
FreezeUnfreeze (5, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE7:
|
||||
FreezeUnfreeze (6, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE8:
|
||||
FreezeUnfreeze (7, TRUE);
|
||||
break;
|
||||
case ID_FILE_SAVE9:
|
||||
FreezeUnfreeze (8, TRUE);
|
||||
break;
|
||||
case ID_CHEAT_ENTER:
|
||||
RestoreGUIDisplay ();
|
||||
S9xRemoveCheats ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEATER), hWnd, DlgCheater);
|
||||
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
|
||||
S9xApplyCheats ();
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_CHEAT_SEARCH:
|
||||
RestoreGUIDisplay ();
|
||||
if(!cheatSearchHWND) // create and show non-modal cheat search window
|
||||
{
|
||||
cheatSearchHWND = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), hWnd, DlgCheatSearch); // non-modal/modeless
|
||||
ShowWindow(cheatSearchHWND, SW_SHOW);
|
||||
}
|
||||
else // already open so just reactivate the window
|
||||
{
|
||||
SetActiveWindow(cheatSearchHWND);
|
||||
}
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_CHEAT_SEARCH_MODAL:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEAT_SEARCH), hWnd, DlgCheatSearch); // modal
|
||||
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_CHEAT_APPLY:
|
||||
Settings.ApplyCheats = !Settings.ApplyCheats;
|
||||
if (!Settings.ApplyCheats){
|
||||
S9xRemoveCheats ();
|
||||
S9xMessage (S9X_INFO, S9X_GAME_GENIE_CODE_ERROR, CHEATS_INFO_DISABLED);
|
||||
}else{
|
||||
S9xApplyCheats ();
|
||||
bool on = false;
|
||||
extern struct SCheatData Cheat;
|
||||
for (uint32 i = 0; i < Cheat.num_cheats && !on; i++)
|
||||
if (Cheat.c [i].enabled)
|
||||
on = true;
|
||||
S9xMessage (S9X_INFO, S9X_GAME_GENIE_CODE_ERROR, on ? CHEATS_INFO_ENABLED : CHEATS_INFO_ENABLED_NONE);
|
||||
}
|
||||
break;
|
||||
case ID_EMULATION_PAUSEWHENINACTIVE:
|
||||
GUI.InactivePause = !GUI.InactivePause;
|
||||
break;
|
||||
case ID_OPTIONS_SETTINGS:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_EMU_SETTINGS), hWnd, DlgEmulatorProc);
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
case ID_HELP_ABOUT:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ABOUT), hWnd, DlgAboutProc);
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
#ifdef DEBUGGER
|
||||
case ID_DEBUG_TRACE:
|
||||
CPU.Flags ^= TRACE_FLAG;
|
||||
break;
|
||||
case ID_DEBUG_TRACE:
|
||||
CPU.Flags ^= TRACE_FLAG;
|
||||
break;
|
||||
|
||||
case ID_DEBUG_FRAME_ADVANCE:
|
||||
CPU.Flags |= FRAME_ADVANCE_FLAG;
|
||||
ICPU.FrameAdvanceCount = 1;
|
||||
Settings.Paused = FALSE;
|
||||
break;
|
||||
case ID_DEBUG_FRAME_ADVANCE:
|
||||
CPU.Flags |= FRAME_ADVANCE_FLAG;
|
||||
ICPU.FrameAdvanceCount = 1;
|
||||
Settings.Paused = FALSE;
|
||||
break;
|
||||
|
||||
case ID_DEBUG_SNES_STATUS:
|
||||
MessageBox(GUI.hWnd, TEXT("Sorry, but this function is not implemented yet."), NULL, MB_OK | MB_ICONINFORMATION);
|
||||
break;
|
||||
case ID_DEBUG_SNES_STATUS:
|
||||
MessageBox(GUI.hWnd, TEXT("Sorry, but this function is not implemented yet."), NULL, MB_OK | MB_ICONINFORMATION);
|
||||
break;
|
||||
#endif
|
||||
case IDM_ROM_INFO:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ROM_INFO), hWnd, DlgInfoProc);
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
default:
|
||||
if ((wParam & 0xffff) >= 0xFF00)
|
||||
{
|
||||
int i = (wParam & 0xffff) - 0xFF00;
|
||||
int j = 0;
|
||||
{
|
||||
while (j < MAX_RECENT_GAMES_LIST_SIZE && j != i)
|
||||
j++;
|
||||
if (i == j)
|
||||
{
|
||||
case IDM_ROM_INFO:
|
||||
RestoreGUIDisplay ();
|
||||
DialogBox(g_hInst, MAKEINTRESOURCE(IDD_ROM_INFO), hWnd, DlgInfoProc);
|
||||
RestoreSNESDisplay ();
|
||||
break;
|
||||
default:
|
||||
if ((wParam & 0xffff) >= 0xFF00)
|
||||
{
|
||||
int i = (wParam & 0xffff) - 0xFF00;
|
||||
int j = 0;
|
||||
{
|
||||
while (j < MAX_RECENT_GAMES_LIST_SIZE && j != i)
|
||||
j++;
|
||||
if (i == j)
|
||||
{
|
||||
|
||||
if (!LoadROM(GUI.RecentGames [i])) {
|
||||
sprintf (String, ERR_ROM_NOT_FOUND, _tToChar(GUI.RecentGames [i]));
|
||||
S9xMessage (S9X_ERROR, S9X_ROM_NOT_FOUND, String);
|
||||
S9xRemoveFromRecentGames(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
if (!LoadROM(GUI.RecentGames [i])) {
|
||||
sprintf (String, ERR_ROM_NOT_FOUND, _tToChar(GUI.RecentGames [i]));
|
||||
S9xMessage (S9X_ERROR, S9X_ROM_NOT_FOUND, String);
|
||||
S9xRemoveFromRecentGames(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_EXITMENULOOP:
|
||||
UpdateWindow(GUI.hWnd);
|
||||
|
@ -3594,6 +3597,9 @@ static void CheckMenuStates ()
|
|||
mii.fState = (Settings.Paused && !Settings.StopEmulation) ? MFS_CHECKED : MFS_UNCHECKED;
|
||||
SetMenuItemInfo (GUI.hMenu, ID_FILE_PAUSE, FALSE, &mii);
|
||||
|
||||
mii.fState = (GUI.InactivePause) ? MFS_CHECKED : MFS_UNCHECKED;
|
||||
SetMenuItemInfo (GUI.hMenu, ID_EMULATION_PAUSEWHENINACTIVE, FALSE, &mii);
|
||||
|
||||
mii.fState = MFS_UNCHECKED;
|
||||
if (Settings.StopEmulation)
|
||||
mii.fState |= MFS_DISABLED;
|
||||
|
|
Loading…
Reference in New Issue