From 75a483f1a60d7d70e1916b57485accfd05d6187a Mon Sep 17 00:00:00 2001 From: SarahW Date: Mon, 21 Aug 2017 19:37:23 +0100 Subject: [PATCH] Fixed Windows CD-ROM configuration in xx GUI. Patch from bit. --- src/wx-sdl2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wx-sdl2.c b/src/wx-sdl2.c index 43616dd..49f3d76 100644 --- a/src/wx-sdl2.c +++ b/src/wx-sdl2.c @@ -378,11 +378,11 @@ void wx_initmenu() if (GetDriveTypeA(s)==DRIVE_CDROM) { 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__ - 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 } @@ -1151,7 +1151,7 @@ int wx_handle_command(void* hwnd, int wParam, int checked) 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) { /* Switching to the same drive. Do nothing. */