Fixed a bug with floppy icons on the status bar;

Fixed a bug with CD-ROM menu items.
This commit is contained in:
OBattler
2017-05-15 01:55:25 +02:00
parent f85a808819
commit ba20130644
2 changed files with 13 additions and 11 deletions

View File

@@ -188,10 +188,10 @@ int file_dlg(HWND hwnd, WCHAR *f, char *fn, int save)
int file_dlg_w_st(HWND hwnd, int i, WCHAR *fn, int save)
{
file_dlg_w(hwnd, win_language_get_string_from_id(i), fn, save);
return file_dlg_w(hwnd, win_language_get_string_from_id(i), fn, save);
}
int file_dlg_st(HWND hwnd, int i, char *fn, int save)
{
file_dlg(hwnd, win_language_get_string_from_id(i), fn, save);
return file_dlg(hwnd, win_language_get_string_from_id(i), fn, save);
}

View File

@@ -1611,11 +1611,8 @@ void win_cdrom_eject(uint8_t id)
/* Signal disc change to the emulated machine. */
cdrom_insert(id);
}
if (cdrom_drives[id].host_drive == 200)
{
CheckMenuItem(hmenu, IDM_CDROM_1_IMAGE + id, MF_UNCHECKED);
}
else
CheckMenuItem(hmenu, IDM_CDROM_1_IMAGE + id, MF_UNCHECKED);
if ((cdrom_drives[id].host_drive >= 65) && (cdrom_drives[id].host_drive <= 90))
{
CheckMenuItem(hmenu, IDM_CDROM_1_REAL + id + (cdrom_drive << 2), MF_UNCHECKED);
}
@@ -2215,6 +2212,7 @@ LRESULT CALLBACK StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPAR
int cdrom_id = 0;
int menu_sub_param = 0;
int menu_super_param = 0;
int ret = 0;
HMENU hmenu;
@@ -2225,7 +2223,8 @@ LRESULT CALLBACK StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPAR
{
case IDM_DISC_1:
case IDM_DISC_1_WP:
if (!file_dlg_w_st(hwnd, 2173, discfns[0], 0))
ret = file_dlg_w_st(hwnd, 2173, discfns[0], 0);
if (!ret)
{
disc_close(0);
ui_writeprot[0] = (LOWORD(wParam) == IDM_DISC_1_WP) ? 1 : 0;
@@ -2237,7 +2236,8 @@ LRESULT CALLBACK StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPAR
break;
case IDM_DISC_2:
case IDM_DISC_2_WP:
if (!file_dlg_w_st(hwnd, 2173, discfns[1], 0))
ret = file_dlg_w_st(hwnd, 2173, discfns[1], 0);
if (!ret)
{
disc_close(1);
ui_writeprot[1] = (LOWORD(wParam) == IDM_DISC_2_WP) ? 1 : 0;
@@ -2249,7 +2249,8 @@ LRESULT CALLBACK StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPAR
break;
case IDM_DISC_3:
case IDM_DISC_3_WP:
if (!file_dlg_w_st(hwnd, 2173, discfns[2], 0))
ret = file_dlg_w_st(hwnd, 2173, discfns[2], 0);
if (!ret)
{
disc_close(2);
ui_writeprot[2] = (LOWORD(wParam) == IDM_DISC_3_WP) ? 1 : 0;
@@ -2261,7 +2262,8 @@ LRESULT CALLBACK StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPAR
break;
case IDM_DISC_4:
case IDM_DISC_4_WP:
if (!file_dlg_w_st(hwnd, 2173, discfns[3], 0))
ret = file_dlg_w_st(hwnd, 2173, discfns[3], 0);
if (!ret)
{
disc_close(3);
ui_writeprot[3] = (LOWORD(wParam) == IDM_DISC_4_WP) ? 1 : 0;