From 3018f8dac0b3ca76495aa8030a9115c43b80c0c5 Mon Sep 17 00:00:00 2001 From: OV2 Date: Thu, 21 Oct 2010 23:07:11 +0200 Subject: [PATCH] Fix menu IDs; always look for valid.ext in DEFAULT_DIR --- win32/rsrc/resource.h | 5 +++-- win32/rsrc/snes9x.rc | 2 +- win32/wsnes9x.cpp | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/win32/rsrc/resource.h b/win32/rsrc/resource.h index 0cf2eab6..e1deca8e 100644 --- a/win32/rsrc/resource.h +++ b/win32/rsrc/resource.h @@ -393,6 +393,7 @@ #define ID_CHEAT_ENTER 40063 #define ID_CHEAT_SEARCH 40064 #define ID_CHEAT_APPLY 40065 +#define ID_FILE_SAVE_SPC_DATA 40066 #define ID_HELP_ABOUT 40067 #define ID_SOUND_OPTIONS 40068 #define ID_OPTIONS_EMULATION 40069 @@ -464,7 +465,6 @@ #define ID_FILE_LOADMULTICART 40153 #define ID_SOUND_16MS 40154 #define ID_SOUND_32MS 40155 -#define ID_FILE_SAVE_SPC_DATA 40066 #define ID_SOUND_48MS 40156 #define ID_SOUND_64MS 40157 #define ID_SOUND_80MS 40158 @@ -476,13 +476,14 @@ #define ID_SOUND_176MS 40164 #define ID_SOUND_194MS 40165 #define ID_SOUND_210MS 40166 +#define ID_EMULATION_PAUSEWHENINACTIVE 40167 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 151 -#define _APS_NEXT_COMMAND_VALUE 40156 +#define _APS_NEXT_COMMAND_VALUE 40168 #define _APS_NEXT_CONTROL_VALUE 3018 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/win32/rsrc/snes9x.rc b/win32/rsrc/snes9x.rc index f843e242..08bdd138 100644 --- a/win32/rsrc/snes9x.rc +++ b/win32/rsrc/snes9x.rc @@ -873,7 +873,7 @@ BEGIN POPUP "&Emulation" BEGIN MENUITEM "&Pause", ID_FILE_PAUSE - MENUITEM "Pause &When Inactive", ID_SOUND_48MS + MENUITEM "Pause &When Inactive", ID_EMULATION_PAUSEWHENINACTIVE MENUITEM SEPARATOR MENUITEM "Se&ttings...\tAlt+F8", ID_OPTIONS_SETTINGS END diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 33e37c4d..89bc3798 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -3190,6 +3190,8 @@ int WINAPI WinMain( { Settings.StopEmulation = TRUE; + SetCurrentDirectory(S9xGetDirectoryT(DEFAULT_DIR)); + // Redirect stderr and stdout to file. It wouldn't go to any commandline anyway. FILE* fout = freopen("stdout.txt", "w", stdout); if(fout) setvbuf(fout, NULL, _IONBF, 0);