diff --git a/changelog.txt b/changelog.txt index fd636f40..8721d756 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +22-august-2009 - adelikat - Win32 - Added a Save Config File menu item 12-august-2009 - adelikat - Win32 - Added a menu item to toggle to New PPU 10-august-2009 - adelikat - fixed bug that caused new movies be created in /movie instead of /movies 08-august-2009 - qeed - mappers - fixed mapper irq count, dragon ball z 3 diff --git a/src/drivers/common/config.cpp b/src/drivers/common/config.cpp index 5539b4b3..ed9a0f84 100644 --- a/src/drivers/common/config.cpp +++ b/src/drivers/common/config.cpp @@ -335,7 +335,7 @@ void SaveFCEUConfig(const char *filename, const CFGSTRUCT *cfgst) if(fp==NULL) return; - + fclose(fp); //adelikat: Adding this so it will let go of the file handle without having to close the emulator! fp = fopen(filename,"wb"); cfg_OldToNew(cfgst); cfg_Save(fp); diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index e89fcb64..e0269f2c 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -146,6 +146,8 @@ BEGIN MENUITEM "&Video...", MENU_VIDEO MENUITEM "&Movie options...", MENU_MOVIEOPTIONS MENUITEM "&Map Hotkeys...", MENU_HOTKEYS + MENUITEM SEPARATOR + MENUITEM "Save Config File", ID_CONFIG_SAVECONFIGFILE END POPUP "&Tools" BEGIN diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index d05b723f..cd29e033 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -695,6 +695,7 @@ #define ID_PPU_OLDPPU 40364 #define ID_NEWPPU 40365 #define ID_OLDPPU 40366 +#define ID_CONFIG_SAVECONFIGFILE 40367 #define IDC_DEBUGGER_ICONTRAY 55535 #define MW_ValueLabel2 65423 #define MW_ValueLabel1 65426 @@ -704,7 +705,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 125 -#define _APS_NEXT_COMMAND_VALUE 40367 +#define _APS_NEXT_COMMAND_VALUE 40368 #define _APS_NEXT_CONTROL_VALUE 1205 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index bfd82f46..5d43885d 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -64,6 +64,7 @@ #include "file.h" #include "mapinput.h" #include "movieoptions.h" +#include "config.h" //adelikat: For SaveConfigFile() #include #include @@ -1119,6 +1120,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) RECT help_rect; int x = 0; + char TempArray[2048]; + switch(msg) { case WM_LBUTTONDOWN: @@ -1661,6 +1664,12 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) OpenMovieOptions(); break; + case ID_CONFIG_SAVECONFIGFILE: + extern string cfgFile; + sprintf(TempArray, "%s/%s", BaseDirectory.c_str(),cfgFile.c_str()); + SaveConfig(TempArray); + break; + //Tools Menu--------------------------------------------------------------- case MENU_CHEATS: ConfigCheats(hWnd);