Fixed Windows CD-ROM configuration in xx GUI. Patch from bit.

This commit is contained in:
SarahW 2017-08-21 19:37:23 +01:00
commit 75a483f1a6

View file

@ -378,11 +378,11 @@ void wx_initmenu()
if (GetDriveTypeA(s)==DRIVE_CDROM) if (GetDriveTypeA(s)==DRIVE_CDROM)
{ {
sprintf(s, "Host CD/DVD Drive (%c:)", c); sprintf(s, "Host CD/DVD Drive (%c:)", c);
wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+(c-'A'), s, wxITEM_RADIO); wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+c, s, wxITEM_RADIO);
} }
} }
#elif __linux__ #elif __linux__
wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL, "Host CD/DVD Drive (/dev/cdrom)", wxITEM_RADIO); wx_appendmenu(cdrom_submenu, IDM_CDROM_REAL+1, "Host CD/DVD Drive (/dev/cdrom)", wxITEM_RADIO);
#endif #endif
} }
@ -1151,7 +1151,7 @@ int wx_handle_command(void* hwnd, int wParam, int checked)
return 0; return 0;
} }
} }
new_cdrom_drive = wParam-IDM_CDROM_REAL+1; new_cdrom_drive = wParam-IDM_CDROM_REAL;
if ((cdrom_drive == new_cdrom_drive) && cdrom_enabled) if ((cdrom_drive == new_cdrom_drive) && cdrom_enabled)
{ {
/* Switching to the same drive. Do nothing. */ /* Switching to the same drive. Do nothing. */