Initial commit for config rework. Work in progress!
This commit is contained in:
parent
1c2158e00f
commit
8538116c19
11 changed files with 125 additions and 69 deletions
1
configs/configs.txt
Normal file
1
configs/configs.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
This directory is used to store config files.
|
||||
|
|
@ -559,6 +559,7 @@ void resetpc();
|
|||
void resetpchard();
|
||||
void speedchanged();
|
||||
|
||||
void saveconfig();
|
||||
void saveconfig(char *fn);
|
||||
void getpath();
|
||||
|
||||
#define UNUSED(x) (void)x
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ uint32_t biosmask;
|
|||
int readlnum=0,writelnum=0;
|
||||
int cachesize=256;
|
||||
|
||||
uint8_t *ram,*rom;
|
||||
uint8_t *ram, *rom = NULL;
|
||||
uint8_t romext[32768];
|
||||
|
||||
static void mem_load_atide115_bios()
|
||||
|
|
@ -81,6 +81,8 @@ int loadbios()
|
|||
|
||||
biosmask = 0xffff;
|
||||
|
||||
if (!rom)
|
||||
rom = malloc(0x20000);
|
||||
memset(romext,0x63,0x4000);
|
||||
memset(rom, 0xff, 0x20000);
|
||||
|
||||
|
|
@ -1774,7 +1776,7 @@ void mem_init()
|
|||
int c;
|
||||
|
||||
ram = malloc((mem_size + 384) * 1024);
|
||||
rom = malloc(0x20000);
|
||||
// rom = malloc(0x20000);
|
||||
readlookup2 = malloc(1024 * 1024 * sizeof(uintptr_t));
|
||||
writelookup2 = malloc(1024 * 1024 * sizeof(uintptr_t));
|
||||
biosmask = 0xffff;
|
||||
|
|
|
|||
28
src/pc.c
28
src/pc.c
|
|
@ -69,7 +69,7 @@ int framecount,fps;
|
|||
int output;
|
||||
int atfullspeed;
|
||||
|
||||
void saveconfig();
|
||||
void saveconfig(char *fn);
|
||||
int infocus;
|
||||
int mousecapture;
|
||||
FILE *pclogf;
|
||||
|
|
@ -202,17 +202,23 @@ void pc_reset()
|
|||
// video_init();
|
||||
}
|
||||
#undef printf
|
||||
void initpc(int argc, char *argv[])
|
||||
void getpath()
|
||||
{
|
||||
char *p;
|
||||
char *config_file = NULL;
|
||||
int c;
|
||||
// allegro_init();
|
||||
|
||||
get_executable_name(pcempath,511);
|
||||
pclog("executable_name = %s\n", pcempath);
|
||||
p=get_filename(pcempath);
|
||||
*p=0;
|
||||
pclog("path = %s\n", pcempath);
|
||||
}
|
||||
|
||||
void initpc(int argc, char *argv[])
|
||||
{
|
||||
//char *p;
|
||||
char *config_file = NULL;
|
||||
int c;
|
||||
// allegro_init();
|
||||
|
||||
for (c = 1; c < argc; c++)
|
||||
{
|
||||
|
|
@ -241,12 +247,12 @@ void initpc(int argc, char *argv[])
|
|||
joystick_init();
|
||||
midi_init();
|
||||
|
||||
append_filename(config_file_default, pcempath, "pcem.cfg", 511);
|
||||
// append_filename(config_file_default, pcempath, "pcem.cfg", 511);
|
||||
|
||||
loadconfig(config_file);
|
||||
pclog("Config loaded\n");
|
||||
if (config_file)
|
||||
saveconfig();
|
||||
// if (config_file)
|
||||
// saveconfig();
|
||||
|
||||
cpuspeed2=(AT)?2:1;
|
||||
// cpuspeed2=cpuspeed;
|
||||
|
|
@ -713,7 +719,7 @@ void loadconfig(char *fn)
|
|||
enable_sync = config_get_int(NULL, "enable_sync", 1);
|
||||
}
|
||||
|
||||
void saveconfig()
|
||||
void saveconfig(char *fn)
|
||||
{
|
||||
int c, d;
|
||||
|
||||
|
|
@ -810,5 +816,9 @@ void saveconfig()
|
|||
|
||||
config_set_int(NULL, "enable_sync", enable_sync);
|
||||
|
||||
pclog("config_save(%s)\n", config_file_default);
|
||||
if (fn)
|
||||
config_save(fn);
|
||||
else
|
||||
config_save(config_file_default);
|
||||
}
|
||||
|
|
|
|||
15
src/pc.rc
15
src/pc.rc
|
|
@ -54,8 +54,7 @@ BEGIN
|
|||
MENUITEM "Disc activity indicator", IDM_VID_DISC
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Load configuration...", IDM_CONFIG_LOAD
|
||||
MENUITEM "&Save configuration...", IDM_CONFIG_SAVE
|
||||
MENUITEM "&Select configuration...", IDM_CONFIG_SELECT
|
||||
END
|
||||
POPUP "&Misc"
|
||||
BEGIN
|
||||
|
|
@ -317,3 +316,15 @@ BEGIN
|
|||
COMBOBOX IDC_HDTYPE, 7,54,172,120,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
|
||||
END
|
||||
|
||||
ConfigureSelectionDlg DIALOGEX 0, 0, 200, 150
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Select Configuration"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK, 200-54, 4, 50, 14, WS_TABSTOP
|
||||
DEFPUSHBUTTON "Cancel", IDCANCEL, 200-54,22, 50, 14, WS_TABSTOP
|
||||
DEFPUSHBUTTON "New...", IDC_NEW, 200-54,40, 50, 14, WS_TABSTOP
|
||||
|
||||
LISTBOX IDC_LIST, 4, 4,140,142, WS_TABSTOP
|
||||
END
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
#define IDM_HDCONF 40014
|
||||
#define IDM_BPB_DISABLE 40015
|
||||
#define IDM_CONFIG 40020
|
||||
#define IDM_CONFIG_LOAD 40021
|
||||
#define IDM_CONFIG_SAVE 40022
|
||||
#define IDM_CONFIG_SELECT 40021
|
||||
#define IDM_STATUS 40030
|
||||
#define IDM_VID_RESIZE 40050
|
||||
#define IDM_VID_REMEMBER 40051
|
||||
|
|
@ -134,3 +133,6 @@
|
|||
|
||||
#define WM_RESETD3D WM_USER
|
||||
#define WM_LEAVEFULLSCREEN WM_USER + 1
|
||||
|
||||
#define IDC_NEW 1200
|
||||
#define IDC_LIST 1201
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ static int settings_sound_to_list[20], settings_list_to_sound[20];
|
|||
static int settings_mouse_to_list[20], settings_list_to_mouse[20];
|
||||
static char *hdd_names[16];
|
||||
|
||||
static int has_been_inited = 0;
|
||||
|
||||
static int mouse_valid(int type, int model)
|
||||
{
|
||||
if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_PS2 && !(models[model].flags & MODEL_PS2))
|
||||
|
|
@ -471,7 +473,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
temp_fda_type != fdd_get_type(0) || temp_fdb_type != fdd_get_type(1) ||
|
||||
temp_mouse_type != mouse_type || hdd_changed)
|
||||
{
|
||||
if (MessageBox(NULL,"This will reset PCem!\nOkay to continue?","PCem",MB_OKCANCEL)==IDOK)
|
||||
if (!has_been_inited || MessageBox(NULL,"This will reset PCem!\nOkay to continue?","PCem",MB_OKCANCEL)==IDOK)
|
||||
{
|
||||
savenvr();
|
||||
model = temp_model;
|
||||
|
|
@ -496,11 +498,13 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
else
|
||||
strcpy(hdd_controller_name, "none");
|
||||
|
||||
|
||||
if (has_been_inited)
|
||||
{
|
||||
mem_resize();
|
||||
loadbios();
|
||||
resetpchard();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EndDialog(hdlg, 0);
|
||||
|
|
@ -520,7 +524,8 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
cpu_waitstates = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
cpu_update_waitstates();
|
||||
|
||||
saveconfig();
|
||||
if (has_been_inited)
|
||||
saveconfig(NULL);
|
||||
|
||||
speedchanged();
|
||||
|
||||
|
|
@ -810,7 +815,9 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void config_open(HWND hwnd)
|
||||
void config_open(HWND hwnd, int inited)
|
||||
{
|
||||
has_been_inited = inited;
|
||||
|
||||
DialogBox(hinstance, TEXT("ConfigureDlg"), hwnd, (DLGPROC)config_dlgproc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam
|
|||
config++;
|
||||
}
|
||||
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
|
||||
resetpchard();
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ static BOOL CALLBACK hdnew_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARA
|
|||
return TRUE;
|
||||
|
||||
case IDC_CFILE:
|
||||
if (!getsfile(hdlg, "Hard disc image (*.IMG)\0*.IMG\0All files (*.*)\0*.*\0", ""))
|
||||
if (!getsfile(hdlg, "Hard disc image (*.IMG)\0*.IMG\0All files (*.*)\0*.*\0", "", NULL))
|
||||
{
|
||||
h = GetDlgItem(hdlg, IDC_EDITC);
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM)openfilestring);
|
||||
|
|
@ -515,7 +515,7 @@ static BOOL CALLBACK hdconf_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
|
||||
cdrom_channel = new_cdrom_channel;
|
||||
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
|
||||
resetpchard();
|
||||
}
|
||||
|
|
|
|||
98
src/win.c
98
src/win.c
|
|
@ -173,6 +173,7 @@ void mainthread(LPVOID param)
|
|||
// Sleep(500);
|
||||
drawits=0;
|
||||
old_time = GetTickCount();
|
||||
|
||||
while (!quited)
|
||||
{
|
||||
if (updatestatus)
|
||||
|
|
@ -555,6 +556,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
/* Make the window visible on the screen */
|
||||
ShowWindow (hwnd, nFunsterStil);
|
||||
|
||||
ghMutex = CreateMutex(NULL, FALSE, NULL);
|
||||
// win_set_window(hwnd);
|
||||
|
||||
memset(rawinputkey, 0, sizeof(rawinputkey));
|
||||
|
|
@ -572,9 +574,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
|
||||
ghwnd=hwnd;
|
||||
|
||||
initpc(argc, argv);
|
||||
|
||||
vid_apis[0][vid_api].init(ghwnd);
|
||||
getpath();
|
||||
|
||||
if (vid_resize) SetWindowLong(hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW|WS_VISIBLE);
|
||||
else SetWindowLong(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX)|WS_VISIBLE);
|
||||
|
|
@ -618,9 +618,18 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
}
|
||||
|
||||
romset=d;
|
||||
c=loadbios();
|
||||
|
||||
if (!c)
|
||||
for (c = 0; c < GFX_MAX; c++)
|
||||
gfx_present[c] = video_card_available(video_old_to_new(c));
|
||||
|
||||
loadconfig(NULL);
|
||||
|
||||
if (!config_selection_open(ghwnd, 0))
|
||||
return 0;
|
||||
|
||||
initpc(argc, argv);
|
||||
|
||||
if (!loadbios())
|
||||
{
|
||||
if (romset!=-1) MessageBox(hwnd,"Configured romset not available.\nDefaulting to available romset.","PCem error",MB_OK);
|
||||
for (c=0;c<ROM_MAX;c++)
|
||||
|
|
@ -629,17 +638,13 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
{
|
||||
romset = c;
|
||||
model = model_getmodel(romset);
|
||||
saveconfig();
|
||||
resetpchard();
|
||||
// saveconfig();
|
||||
// resetpchard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (c = 0; c < GFX_MAX; c++)
|
||||
gfx_present[c] = video_card_available(video_old_to_new(c));
|
||||
|
||||
if (!video_card_available(video_old_to_new(gfxcard)))
|
||||
{
|
||||
if (romset!=-1) MessageBox(hwnd,"Configured video BIOS not available.\nDefaulting to available romset.","PCem error",MB_OK);
|
||||
|
|
@ -648,8 +653,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
if (gfx_present[c])
|
||||
{
|
||||
gfxcard = c;
|
||||
saveconfig();
|
||||
resetpchard();
|
||||
// saveconfig();
|
||||
// resetpchard();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -662,11 +667,12 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
|
||||
atexit(releasemouse);
|
||||
|
||||
vid_apis[0][vid_api].init(ghwnd);
|
||||
|
||||
// QueryPerformanceFrequency(&counter_base);
|
||||
/// QueryPerformanceCounter(&counter_posold);
|
||||
// counter_posold.QuadPart*=100;
|
||||
|
||||
ghMutex = CreateMutex(NULL, FALSE, NULL);
|
||||
mainthreadh=(HANDLE)_beginthread(mainthread,0,NULL);
|
||||
SetThreadPriority(mainthreadh, THREAD_PRIORITY_HIGHEST);
|
||||
|
||||
|
|
@ -681,6 +687,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
|
||||
// ShowCursor(TRUE);
|
||||
|
||||
// return 0;
|
||||
|
||||
if (start_in_fullscreen)
|
||||
{
|
||||
startblit();
|
||||
|
|
@ -748,7 +756,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
// pclog("Closepc\n");
|
||||
savenvr();
|
||||
if (save_window_pos && window_remember)
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
closepc();
|
||||
// pclog("dumpregs\n");
|
||||
|
||||
|
|
@ -810,7 +818,7 @@ int getfile(HWND hwnd, char *f, char *fn)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int getsfile(HWND hwnd, char *f, char *fn)
|
||||
int getsfile(HWND hwnd, char *f, char *fn, char *dir)
|
||||
{
|
||||
OPENFILENAME ofn; // common dialog box structure
|
||||
BOOL r;
|
||||
|
|
@ -832,7 +840,7 @@ int getsfile(HWND hwnd, char *f, char *fn)
|
|||
ofn.nFilterIndex = 1;
|
||||
ofn.lpstrFileTitle = NULL;
|
||||
ofn.nMaxFileTitle = 0;
|
||||
ofn.lpstrInitialDir = NULL;
|
||||
ofn.lpstrInitialDir = dir;
|
||||
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
|
||||
|
||||
// Display the Open dialog box.
|
||||
|
|
@ -933,7 +941,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
{
|
||||
disc_close(0);
|
||||
disc_load(0, openfilestring);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
}
|
||||
break;
|
||||
case IDM_DISC_B:
|
||||
|
|
@ -941,27 +949,27 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
{
|
||||
disc_close(1);
|
||||
disc_load(1, openfilestring);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
}
|
||||
break;
|
||||
case IDM_EJECT_A:
|
||||
disc_close(0);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
case IDM_EJECT_B:
|
||||
disc_close(1);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
case IDM_BPB_DISABLE:
|
||||
bpb_disable = !bpb_disable;
|
||||
CheckMenuItem(hmenu, IDM_BPB_DISABLE, bpb_disable ? MF_CHECKED : MF_UNCHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
case IDM_HDCONF:
|
||||
hdconf_open(hwnd);
|
||||
break;
|
||||
case IDM_CONFIG:
|
||||
config_open(hwnd);
|
||||
config_open(hwnd, 1);
|
||||
break;
|
||||
case IDM_STATUS:
|
||||
status_open(hwnd);
|
||||
|
|
@ -974,12 +982,12 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
else SetWindowLong(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX)|WS_VISIBLE);
|
||||
GetWindowRect(hwnd,&rect);
|
||||
SetWindowPos(hwnd, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
case IDM_VID_ASPECT:
|
||||
video_force_aspect_ration = !video_force_aspect_ration;
|
||||
CheckMenuItem(hmenu, IDM_VID_ASPECT, video_force_aspect_ration ? MF_CHECKED : MF_UNCHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
case IDM_VID_REMEMBER:
|
||||
window_remember = !window_remember;
|
||||
|
|
@ -992,7 +1000,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
window_w = rect.right - rect.left;
|
||||
window_h = rect.bottom - rect.top;
|
||||
}
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
|
||||
case IDM_VID_DDRAW: case IDM_VID_D3D:
|
||||
|
|
@ -1004,7 +1012,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
CheckMenuItem(hmenu, IDM_VID_DDRAW + vid_api, MF_CHECKED);
|
||||
vid_apis[0][vid_api].init(ghwnd);
|
||||
endblit();
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
device_force_redraw();
|
||||
break;
|
||||
|
||||
|
|
@ -1033,16 +1041,28 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
CheckMenuItem(hmenu, IDM_VID_FS_FULL + video_fullscreen_scale, MF_UNCHECKED);
|
||||
video_fullscreen_scale = LOWORD(wParam) - IDM_VID_FS_FULL;
|
||||
CheckMenuItem(hmenu, IDM_VID_FS_FULL + video_fullscreen_scale, MF_CHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
|
||||
case IDM_VID_DISC:
|
||||
vid_disc_indicator = !vid_disc_indicator;
|
||||
CheckMenuItem(hmenu, IDM_VID_DISC, vid_disc_indicator ? MF_CHECKED : MF_UNCHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
break;
|
||||
|
||||
case IDM_CONFIG_LOAD:
|
||||
case IDM_CONFIG_SELECT:
|
||||
pause = 1;
|
||||
if (config_selection_open(ghwnd, 1))
|
||||
{
|
||||
loadconfig(NULL);
|
||||
mem_resize();
|
||||
loadbios();
|
||||
resetpchard();
|
||||
}
|
||||
pause = 0;
|
||||
break;
|
||||
|
||||
/* case IDM_CONFIG_LOAD:
|
||||
pause = 1;
|
||||
if (!getfile(hwnd, "Configuration (*.CFG)\0*.CFG\0All files (*.*)\0*.*\0", ""))
|
||||
{
|
||||
|
|
@ -1060,10 +1080,10 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
|
||||
case IDM_CONFIG_SAVE:
|
||||
pause = 1;
|
||||
if (!getsfile(hwnd, "Configuration (*.CFG)\0*.CFG\0All files (*.*)\0*.*\0", ""))
|
||||
if (!getsfile(hwnd, "Configuration (*.CFG)\0*.CFG\0All files (*.*)\0*.*\0", "", NULL))
|
||||
config_save(openfilestring);
|
||||
pause = 0;
|
||||
break;
|
||||
break;*/
|
||||
|
||||
case IDM_CDROM_DISABLED:
|
||||
if (cdrom_enabled)
|
||||
|
|
@ -1090,7 +1110,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
pause = 1;
|
||||
Sleep(100);
|
||||
cdrom_enabled = 0;
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
resetpchard();
|
||||
pause = 0;
|
||||
}
|
||||
|
|
@ -1121,13 +1141,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
old_cdrom_drive = cdrom_drive;
|
||||
cdrom_drive=0;
|
||||
CheckMenuItem(hmenu, IDM_CDROM_EMPTY, MF_CHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
if (!cdrom_enabled)
|
||||
{
|
||||
pause = 1;
|
||||
Sleep(100);
|
||||
cdrom_enabled = 1;
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
resetpchard();
|
||||
pause = 0;
|
||||
}
|
||||
|
|
@ -1161,13 +1181,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
||||
cdrom_drive = CDROM_ISO;
|
||||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_CHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
if (!cdrom_enabled)
|
||||
{
|
||||
pause = 1;
|
||||
Sleep(100);
|
||||
cdrom_enabled = 1;
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
resetpchard();
|
||||
pause = 0;
|
||||
}
|
||||
|
|
@ -1202,13 +1222,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
||||
cdrom_drive = new_cdrom_drive;
|
||||
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_CHECKED);
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
if (!cdrom_enabled)
|
||||
{
|
||||
pause = 1;
|
||||
Sleep(100);
|
||||
cdrom_enabled = 1;
|
||||
saveconfig();
|
||||
saveconfig(NULL);
|
||||
resetpchard();
|
||||
pause = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ extern int status_is_open;
|
|||
|
||||
void hdconf_open(HWND hwnd);
|
||||
|
||||
void config_open(HWND hwnd);
|
||||
void config_open(HWND hwnd, int inited);
|
||||
|
||||
int config_selection_open(HWND hwnd, int inited);
|
||||
|
||||
struct device_t;
|
||||
|
||||
|
|
@ -32,6 +34,6 @@ void joystickconfig_open(HWND hwnd, int joy_nr, int type);
|
|||
extern char openfilestring[260];
|
||||
|
||||
int getfile(HWND hwnd, char *f, char *fn);
|
||||
int getsfile(HWND hwnd, char *f, char *fn);
|
||||
int getsfile(HWND hwnd, char *f, char *fn, char *dir);
|
||||
|
||||
extern int pause;
|
||||
|
|
|
|||
Loading…
Reference in a new issue