Added configuration load/save options.

This commit is contained in:
TomW 2014-08-23 21:32:36 +01:00
commit 66b9ccf1ab
7 changed files with 54 additions and 13 deletions

View file

@ -14,6 +14,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include "ibm.h"
#include "config.h"
#include "video.h"
#include "resources.h"
#include "cpu.h"
@ -840,6 +841,29 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
CheckMenuItem(hmenu, IDM_VID_FS_FULL + video_fullscreen_scale, MF_CHECKED);
saveconfig();
break;
case IDM_CONFIG_LOAD:
pause = 1;
if (!getfile(hwnd, "Configuration (*.CFG)\0*.CFG\0All files (*.*)\0*.*\0", ""))
{
if (MessageBox(NULL, "This will reset PCem!\nOkay to continue?", "PCem", MB_OKCANCEL) == IDOK)
{
loadconfig(openfilestring);
config_save(config_file_default);
mem_resize();
loadbios();
resetpchard();
}
}
pause = 0;
break;
case IDM_CONFIG_SAVE:
pause = 1;
if (!getsfile(hwnd, "Configuration (*.CFG)\0*.CFG\0All files (*.*)\0*.*\0", ""))
config_save(openfilestring);
pause = 0;
break;
case IDM_CDROM_DISABLED:
if (cdrom_enabled)