Win32 - adding a Save Config File menu item.
This commit is contained in:
parent
1588ab19de
commit
106e1ca031
|
@ -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
|
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
|
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
|
08-august-2009 - qeed - mappers - fixed mapper irq count, dragon ball z 3
|
||||||
|
|
|
@ -335,7 +335,7 @@ void SaveFCEUConfig(const char *filename, const CFGSTRUCT *cfgst)
|
||||||
|
|
||||||
if(fp==NULL)
|
if(fp==NULL)
|
||||||
return;
|
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");
|
fp = fopen(filename,"wb");
|
||||||
cfg_OldToNew(cfgst);
|
cfg_OldToNew(cfgst);
|
||||||
cfg_Save(fp);
|
cfg_Save(fp);
|
||||||
|
|
|
@ -146,6 +146,8 @@ BEGIN
|
||||||
MENUITEM "&Video...", MENU_VIDEO
|
MENUITEM "&Video...", MENU_VIDEO
|
||||||
MENUITEM "&Movie options...", MENU_MOVIEOPTIONS
|
MENUITEM "&Movie options...", MENU_MOVIEOPTIONS
|
||||||
MENUITEM "&Map Hotkeys...", MENU_HOTKEYS
|
MENUITEM "&Map Hotkeys...", MENU_HOTKEYS
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "Save Config File", ID_CONFIG_SAVECONFIGFILE
|
||||||
END
|
END
|
||||||
POPUP "&Tools"
|
POPUP "&Tools"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
|
@ -695,6 +695,7 @@
|
||||||
#define ID_PPU_OLDPPU 40364
|
#define ID_PPU_OLDPPU 40364
|
||||||
#define ID_NEWPPU 40365
|
#define ID_NEWPPU 40365
|
||||||
#define ID_OLDPPU 40366
|
#define ID_OLDPPU 40366
|
||||||
|
#define ID_CONFIG_SAVECONFIGFILE 40367
|
||||||
#define IDC_DEBUGGER_ICONTRAY 55535
|
#define IDC_DEBUGGER_ICONTRAY 55535
|
||||||
#define MW_ValueLabel2 65423
|
#define MW_ValueLabel2 65423
|
||||||
#define MW_ValueLabel1 65426
|
#define MW_ValueLabel1 65426
|
||||||
|
@ -704,7 +705,7 @@
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 125
|
#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_CONTROL_VALUE 1205
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "mapinput.h"
|
#include "mapinput.h"
|
||||||
#include "movieoptions.h"
|
#include "movieoptions.h"
|
||||||
|
#include "config.h" //adelikat: For SaveConfigFile()
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -1119,6 +1120,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
RECT help_rect;
|
RECT help_rect;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
||||||
|
char TempArray[2048];
|
||||||
|
|
||||||
switch(msg)
|
switch(msg)
|
||||||
{
|
{
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
|
@ -1661,6 +1664,12 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
OpenMovieOptions();
|
OpenMovieOptions();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ID_CONFIG_SAVECONFIGFILE:
|
||||||
|
extern string cfgFile;
|
||||||
|
sprintf(TempArray, "%s/%s", BaseDirectory.c_str(),cfgFile.c_str());
|
||||||
|
SaveConfig(TempArray);
|
||||||
|
break;
|
||||||
|
|
||||||
//Tools Menu---------------------------------------------------------------
|
//Tools Menu---------------------------------------------------------------
|
||||||
case MENU_CHEATS:
|
case MENU_CHEATS:
|
||||||
ConfigCheats(hWnd);
|
ConfigCheats(hWnd);
|
||||||
|
|
Loading…
Reference in New Issue