Bugfixes related to the SCSI CD-ROM menu item;
Added a menu item to enable/disable the SCSI controller.
This commit is contained in:
@@ -27,14 +27,15 @@ BEGIN
|
|||||||
MENUITEM "E&ject drive B:", IDM_EJECT_B
|
MENUITEM "E&ject drive B:", IDM_EJECT_B
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Configure hard discs...",IDM_HDCONF
|
MENUITEM "&Configure hard discs...",IDM_HDCONF
|
||||||
POPUP "&CD-ROM"
|
POPUP "C&D-ROM"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Disabled", IDM_CDROM_DISABLED
|
MENUITEM "&Enabled", IDM_CDROM_ENABLED
|
||||||
MENUITEM "&SCSI", IDM_CDROM_SCSI
|
MENUITEM "&SCSI", IDM_CDROM_SCSI
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Empty",IDM_CDROM_EMPTY
|
MENUITEM "&Empty",IDM_CDROM_EMPTY
|
||||||
MENUITEM "&ISO...",IDM_CDROM_ISO
|
MENUITEM "&ISO...",IDM_CDROM_ISO
|
||||||
END
|
END
|
||||||
|
MENUITEM "&SCSI controller enabled",IDM_SCSI_ENABLED
|
||||||
END
|
END
|
||||||
POPUP "&Settings"
|
POPUP "&Settings"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@@ -29,8 +29,9 @@
|
|||||||
#define IDM_CDROM_ISO 40100
|
#define IDM_CDROM_ISO 40100
|
||||||
#define IDM_CDROM_EMPTY 40200
|
#define IDM_CDROM_EMPTY 40200
|
||||||
#define IDM_CDROM_REAL 40200
|
#define IDM_CDROM_REAL 40200
|
||||||
#define IDM_CDROM_DISABLED 40300
|
#define IDM_CDROM_ENABLED 40300
|
||||||
#define IDM_CDROM_SCSI 40400
|
#define IDM_CDROM_SCSI 40400
|
||||||
|
#define IDM_SCSI_ENABLED 40500
|
||||||
|
|
||||||
#define IDC_COMBO1 1000
|
#define IDC_COMBO1 1000
|
||||||
#define IDC_COMBOVID 1001
|
#define IDC_COMBOVID 1001
|
||||||
|
37
src/win.c
37
src/win.c
@@ -321,8 +321,8 @@ static void initmenu(void)
|
|||||||
int c;
|
int c;
|
||||||
HMENU m;
|
HMENU m;
|
||||||
char s[32];
|
char s[32];
|
||||||
m=GetSubMenu(menu,1); /*Disc*/
|
m=GetSubMenu(menu,2); /*Settings*/
|
||||||
m=GetSubMenu(m,9); /*CD-ROM*/
|
m=GetSubMenu(m,5); /*CD-ROM*/
|
||||||
|
|
||||||
/* Loop through each Windows drive letter and test to see if
|
/* Loop through each Windows drive letter and test to see if
|
||||||
it's a CDROM */
|
it's a CDROM */
|
||||||
@@ -619,12 +619,15 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||||||
// pclog("Checking CD-ROM menu item...\n");
|
// pclog("Checking CD-ROM menu item...\n");
|
||||||
|
|
||||||
/* Note by Kiririn: I've redone this since the CD-ROM can be disabled but still have something inside it. */
|
/* Note by Kiririn: I've redone this since the CD-ROM can be disabled but still have something inside it. */
|
||||||
if (!cdrom_enabled)
|
if (cdrom_enabled)
|
||||||
CheckMenuItem(menu, IDM_CDROM_DISABLED, MF_CHECKED);
|
CheckMenuItem(menu, IDM_CDROM_ENABLED, MF_CHECKED);
|
||||||
|
|
||||||
if (scsi_cdrom_enabled)
|
if (scsi_cdrom_enabled)
|
||||||
CheckMenuItem(menu, IDM_CDROM_SCSI, MF_CHECKED);
|
CheckMenuItem(menu, IDM_CDROM_SCSI, MF_CHECKED);
|
||||||
|
|
||||||
|
if (aha154x_enabled)
|
||||||
|
CheckMenuItem(menu, IDM_SCSI_ENABLED, MF_CHECKED);
|
||||||
|
|
||||||
if (cdrom_drive == 200)
|
if (cdrom_drive == 200)
|
||||||
CheckMenuItem(menu, IDM_CDROM_ISO, MF_CHECKED);
|
CheckMenuItem(menu, IDM_CDROM_ISO, MF_CHECKED);
|
||||||
else
|
else
|
||||||
@@ -1167,7 +1170,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case IDM_CDROM_DISABLED:
|
case IDM_CDROM_ENABLED:
|
||||||
if (MessageBox(NULL,"This will reset 86Box!\nOkay to continue?","86Box",MB_OKCANCEL) != IDOK)
|
if (MessageBox(NULL,"This will reset 86Box!\nOkay to continue?","86Box",MB_OKCANCEL) != IDOK)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -1175,7 +1178,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
pause = 1;
|
pause = 1;
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
cdrom_enabled ^= 1;
|
cdrom_enabled ^= 1;
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, cdrom_enabled ? MF_UNCHECKED : MF_CHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_ENABLED, cdrom_enabled ? MF_CHECKED : MF_UNCHECKED);
|
||||||
saveconfig();
|
saveconfig();
|
||||||
resetpchard();
|
resetpchard();
|
||||||
pause = 0;
|
pause = 0;
|
||||||
@@ -1189,7 +1192,21 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
pause = 1;
|
pause = 1;
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
scsi_cdrom_enabled ^= 1;
|
scsi_cdrom_enabled ^= 1;
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, scsi_cdrom_enabled ? MF_CHECKED : MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_SCSI, scsi_cdrom_enabled ? MF_CHECKED : MF_UNCHECKED);
|
||||||
|
saveconfig();
|
||||||
|
resetpchard();
|
||||||
|
pause = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCSI_ENABLED:
|
||||||
|
if (MessageBox(NULL,"This will reset 86Box!\nOkay to continue?","86Box",MB_OKCANCEL) != IDOK)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pause = 1;
|
||||||
|
Sleep(100);
|
||||||
|
aha154x_enabled ^= 1;
|
||||||
|
CheckMenuItem(hmenu, IDM_SCSI_ENABLED, aha_154x_enabled ? MF_CHECKED : MF_UNCHECKED);
|
||||||
saveconfig();
|
saveconfig();
|
||||||
resetpchard();
|
resetpchard();
|
||||||
pause = 0;
|
pause = 0;
|
||||||
@@ -1216,7 +1233,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
SCSICDROM_Insert();
|
SCSICDROM_Insert();
|
||||||
}
|
}
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_UNCHECKED);
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, MF_UNCHECKED);
|
// CheckMenuItem(hmenu, IDM_CDROM_DISABLED, MF_UNCHECKED);
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
||||||
old_cdrom_drive = cdrom_drive;
|
old_cdrom_drive = cdrom_drive;
|
||||||
cdrom_drive=0;
|
cdrom_drive=0;
|
||||||
@@ -1258,7 +1275,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
SCSICDROM_Insert();
|
SCSICDROM_Insert();
|
||||||
}
|
}
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_UNCHECKED);
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, MF_UNCHECKED);
|
// CheckMenuItem(hmenu, IDM_CDROM_DISABLED, MF_UNCHECKED);
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
||||||
cdrom_drive = 200;
|
cdrom_drive = 200;
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_CHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_CHECKED);
|
||||||
@@ -1300,7 +1317,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
SCSICDROM_Insert();
|
SCSICDROM_Insert();
|
||||||
}
|
}
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_UNCHECKED);
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, MF_UNCHECKED);
|
// CheckMenuItem(hmenu, IDM_CDROM_DISABLED, MF_UNCHECKED);
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_UNCHECKED);
|
||||||
cdrom_drive = new_cdrom_drive;
|
cdrom_drive = new_cdrom_drive;
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_CHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_REAL + cdrom_drive, MF_CHECKED);
|
||||||
|
Reference in New Issue
Block a user