Reworked the menus so they're more logically grouped;
Removed the lone Misc menu and mvoed Status to Settings; Added a SCSI CD-ROM option to the menu; Removed the atapi_cdrom_enabled option and replaced any usage of it with !scsi_cdrom_enabled; Disabling/enabling the CD-ROM drive is now separate from the drive's contents; The tertiary IDE controller now never gets enabled is the CD-ROM drive is either disabled or SCSI.
This commit is contained in:
@@ -571,7 +571,7 @@ extern int cdrom_drive;
|
|||||||
extern int old_cdrom_drive;
|
extern int old_cdrom_drive;
|
||||||
extern int idecallback[3];
|
extern int idecallback[3];
|
||||||
extern int cdrom_enabled;
|
extern int cdrom_enabled;
|
||||||
extern int atapi_cdrom_enabled, scsi_cdrom_enabled;
|
extern int scsi_cdrom_enabled;
|
||||||
|
|
||||||
#define CD_STATUS_EMPTY 0
|
#define CD_STATUS_EMPTY 0
|
||||||
#define CD_STATUS_DATA_ONLY 1
|
#define CD_STATUS_DATA_ONLY 1
|
||||||
|
|||||||
@@ -629,9 +629,8 @@ void resetide(void)
|
|||||||
{
|
{
|
||||||
ide_drives[d].packetstatus = 0xFF;
|
ide_drives[d].packetstatus = 0xFF;
|
||||||
|
|
||||||
if ((atapi_cdrom_channel == d) && atapi_cdrom_enabled)
|
if ((atapi_cdrom_channel == d) && cdrom_enabled && !scsi_cdrom_enabled)
|
||||||
{
|
{
|
||||||
if (cdrom_enabled)
|
|
||||||
ide_drives[d].type = IDE_CDROM;
|
ide_drives[d].type = IDE_CDROM;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -654,9 +653,8 @@ void resetide(void)
|
|||||||
{
|
{
|
||||||
ide_drives[d].packetstatus = 0xFF;
|
ide_drives[d].packetstatus = 0xFF;
|
||||||
|
|
||||||
if ((atapi_cdrom_channel == d) && atapi_cdrom_enabled)
|
if ((atapi_cdrom_channel == d) && cdrom_enabled && !scsi_cdrom_enabled)
|
||||||
{
|
{
|
||||||
if (cdrom_enabled)
|
|
||||||
ide_drives[d].type = IDE_CDROM;
|
ide_drives[d].type = IDE_CDROM;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
28
src/model.c
28
src/model.c
@@ -429,7 +429,7 @@ void at_sis496_init()
|
|||||||
mouse_serial_init();
|
mouse_serial_init();
|
||||||
pci_init(PCI_CONFIG_TYPE_1, 0, 31);
|
pci_init(PCI_CONFIG_TYPE_1, 0, 31);
|
||||||
device_add(&sis496_device);
|
device_add(&sis496_device);
|
||||||
ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_r418_init()
|
void at_r418_init()
|
||||||
@@ -440,7 +440,7 @@ void at_r418_init()
|
|||||||
pci_init(PCI_CONFIG_TYPE_1, 0, 31);
|
pci_init(PCI_CONFIG_TYPE_1, 0, 31);
|
||||||
fdc37c665_init();
|
fdc37c665_init();
|
||||||
device_add(&sis496_device);
|
device_add(&sis496_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_batman_init()
|
void at_batman_init()
|
||||||
@@ -453,7 +453,7 @@ void at_batman_init()
|
|||||||
fdc37c665_init();
|
fdc37c665_init();
|
||||||
intel_batman_init();
|
intel_batman_init();
|
||||||
device_add(&intel_flash_bxt_ami_device);
|
device_add(&intel_flash_bxt_ami_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_586mc1_init()
|
void at_586mc1_init()
|
||||||
@@ -479,7 +479,7 @@ void at_plato_init()
|
|||||||
/* It seems it uses the same interface as Batman. */
|
/* It seems it uses the same interface as Batman. */
|
||||||
intel_batman_init();
|
intel_batman_init();
|
||||||
device_add(&intel_flash_bxt_ami_device);
|
device_add(&intel_flash_bxt_ami_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_advanced_common_init()
|
void at_advanced_common_init()
|
||||||
@@ -491,7 +491,7 @@ void at_advanced_common_init()
|
|||||||
piix_init(7);
|
piix_init(7);
|
||||||
// pc87306_init();
|
// pc87306_init();
|
||||||
intel_endeavor_init();
|
intel_endeavor_init();
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_endeavor_init()
|
void at_endeavor_init()
|
||||||
@@ -518,7 +518,7 @@ void at_mb500n_init()
|
|||||||
fdc37c665_init();
|
fdc37c665_init();
|
||||||
intel_endeavor_init();
|
intel_endeavor_init();
|
||||||
device_add(&intel_flash_bxt_device);
|
device_add(&intel_flash_bxt_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -533,7 +533,7 @@ void at_p54tp4xe_init()
|
|||||||
fdc37c665_init();
|
fdc37c665_init();
|
||||||
intel_endeavor_init();
|
intel_endeavor_init();
|
||||||
device_add(&intel_flash_bxt_device);
|
device_add(&intel_flash_bxt_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -548,7 +548,7 @@ void at_acerm3a_init()
|
|||||||
fdc37c932fr_init();
|
fdc37c932fr_init();
|
||||||
acerm3a_io_init();
|
acerm3a_io_init();
|
||||||
device_add(&intel_flash_bxb_device);
|
device_add(&intel_flash_bxb_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_acerv35n_init()
|
void at_acerv35n_init()
|
||||||
@@ -562,7 +562,7 @@ void at_acerv35n_init()
|
|||||||
fdc37c932fr_init();
|
fdc37c932fr_init();
|
||||||
acerm3a_io_init();
|
acerm3a_io_init();
|
||||||
device_add(&intel_flash_bxb_device);
|
device_add(&intel_flash_bxb_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -576,7 +576,7 @@ void at_p55t2p4_init()
|
|||||||
piix3_init(7);
|
piix3_init(7);
|
||||||
w83877f_init();
|
w83877f_init();
|
||||||
device_add(&intel_flash_bxt_device);
|
device_add(&intel_flash_bxt_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -590,7 +590,7 @@ void at_i430vx_init()
|
|||||||
piix3_init(7);
|
piix3_init(7);
|
||||||
um8669f_init();
|
um8669f_init();
|
||||||
device_add(&intel_flash_bxt_device);
|
device_add(&intel_flash_bxt_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
// rom_t ami_ec_rom;
|
// rom_t ami_ec_rom;
|
||||||
@@ -612,7 +612,7 @@ void at_p55tvp4_init()
|
|||||||
|
|
||||||
intel_endeavor_init(); */
|
intel_endeavor_init(); */
|
||||||
|
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -626,7 +626,7 @@ void at_p55va_init()
|
|||||||
piix3_init(7);
|
piix3_init(7);
|
||||||
fdc37c932fr_init();
|
fdc37c932fr_init();
|
||||||
device_add(&intel_flash_bxt_device);
|
device_add(&intel_flash_bxt_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void at_i440fx_init()
|
void at_i440fx_init()
|
||||||
@@ -639,7 +639,7 @@ void at_i440fx_init()
|
|||||||
piix3_init(7);
|
piix3_init(7);
|
||||||
fdc37c665_init();
|
fdc37c665_init();
|
||||||
device_add(&intel_flash_bxt_device);
|
device_add(&intel_flash_bxt_device);
|
||||||
if (atapi_cdrom_channel >= 4) ide_ter_init();
|
if ((atapi_cdrom_channel >= 4) && (atapi_cdrom_channel <= 5) && cdrom_enabled && !scsi_cdrom_enabled) ide_ter_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void model_init()
|
void model_init()
|
||||||
|
|||||||
4
src/pc.c
4
src/pc.c
@@ -60,7 +60,7 @@ int window_w, window_h, window_x, window_y, window_remember;
|
|||||||
int start_in_fullscreen = 0;
|
int start_in_fullscreen = 0;
|
||||||
int frame = 0;
|
int frame = 0;
|
||||||
|
|
||||||
int scsi_cdrom_enabled, atapi_cdrom_enabled;
|
int scsi_cdrom_enabled;
|
||||||
int cdrom_enabled;
|
int cdrom_enabled;
|
||||||
int CPUID;
|
int CPUID;
|
||||||
int vid_resize, vid_api;
|
int vid_resize, vid_api;
|
||||||
@@ -670,7 +670,6 @@ void loadconfig(char *fn)
|
|||||||
old_cdrom_drive = cdrom_drive;
|
old_cdrom_drive = cdrom_drive;
|
||||||
cdrom_enabled = config_get_int(NULL, "cdrom_enabled", 0);
|
cdrom_enabled = config_get_int(NULL, "cdrom_enabled", 0);
|
||||||
|
|
||||||
atapi_cdrom_enabled = config_get_int(NULL, "atapi_cdrom_enabled", 1);
|
|
||||||
atapi_cdrom_channel = config_get_int(NULL, "atapi_cdrom_channel", 2);
|
atapi_cdrom_channel = config_get_int(NULL, "atapi_cdrom_channel", 2);
|
||||||
|
|
||||||
scsi_cdrom_enabled = config_get_int(NULL, "scsi_cdrom_enabled", 0);
|
scsi_cdrom_enabled = config_get_int(NULL, "scsi_cdrom_enabled", 0);
|
||||||
@@ -816,7 +815,6 @@ void saveconfig()
|
|||||||
config_set_int(NULL, "cdrom_drive", cdrom_drive);
|
config_set_int(NULL, "cdrom_drive", cdrom_drive);
|
||||||
config_set_int(NULL, "cdrom_enabled", cdrom_enabled);
|
config_set_int(NULL, "cdrom_enabled", cdrom_enabled);
|
||||||
|
|
||||||
config_set_int(NULL, "atapi_cdrom_enabled", atapi_cdrom_enabled);
|
|
||||||
config_set_int(NULL, "atapi_cdrom_channel", atapi_cdrom_channel);
|
config_set_int(NULL, "atapi_cdrom_channel", atapi_cdrom_channel);
|
||||||
|
|
||||||
config_set_int(NULL, "scsi_cdrom_enabled", scsi_cdrom_enabled);
|
config_set_int(NULL, "scsi_cdrom_enabled", scsi_cdrom_enabled);
|
||||||
|
|||||||
27
src/pc.rc
27
src/pc.rc
@@ -20,21 +20,28 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Change drive &A:...", IDM_DISC_A
|
MENUITEM "Change drive &A:...", IDM_DISC_A
|
||||||
MENUITEM "Change drive A (&Write-protected):...", IDM_DISC_A_WP
|
MENUITEM "Change drive A (&Write-protected):...", IDM_DISC_A_WP
|
||||||
|
MENUITEM "&Eject drive A:", IDM_EJECT_A
|
||||||
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Change drive &B:...", IDM_DISC_B
|
MENUITEM "Change drive &B:...", IDM_DISC_B
|
||||||
MENUITEM "Change drive B (W&rite-protected):...", IDM_DISC_B_WP
|
MENUITEM "Change drive B (W&rite-protected):...", IDM_DISC_B_WP
|
||||||
MENUITEM "&Eject drive A:", IDM_EJECT_A
|
|
||||||
MENUITEM "E&ject drive B:", IDM_EJECT_B
|
MENUITEM "E&ject drive B:", IDM_EJECT_B
|
||||||
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Configure hard discs...",IDM_HDCONF
|
MENUITEM "&Configure hard discs...",IDM_HDCONF
|
||||||
|
POPUP "&CD-ROM"
|
||||||
|
BEGIN
|
||||||
|
MENUITEM "&Disabled", IDM_CDROM_DISABLED
|
||||||
|
MENUITEM "&SCSI", IDM_CDROM_SCSI
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "&Empty",IDM_CDROM_EMPTY
|
||||||
|
MENUITEM "&ISO...",IDM_CDROM_ISO
|
||||||
|
END
|
||||||
END
|
END
|
||||||
POPUP "&Settings"
|
POPUP "&Settings"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Configure...", IDM_CONFIG
|
MENUITEM "&Configure...", IDM_CONFIG
|
||||||
POPUP "&CD-ROM"
|
MENUITEM "&Load configuration...", IDM_CONFIG_LOAD
|
||||||
BEGIN
|
MENUITEM "&Save configuration...", IDM_CONFIG_SAVE
|
||||||
MENUITEM "&Disabled", IDM_CDROM_DISABLED
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Empty",IDM_CDROM_EMPTY
|
|
||||||
MENUITEM "&ISO...",IDM_CDROM_ISO
|
|
||||||
END
|
|
||||||
POPUP "&Video"
|
POPUP "&Video"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Resizeable window",IDM_VID_RESIZE
|
MENUITEM "&Resizeable window",IDM_VID_RESIZE
|
||||||
@@ -54,12 +61,6 @@ BEGIN
|
|||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Take s&creenshot\tCtrl+F11", IDM_VID_SCREENSHOT
|
MENUITEM "Take s&creenshot\tCtrl+F11", IDM_VID_SCREENSHOT
|
||||||
END
|
END
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "&Load configuration...", IDM_CONFIG_LOAD
|
|
||||||
MENUITEM "&Save configuration...", IDM_CONFIG_SAVE
|
|
||||||
END
|
|
||||||
POPUP "&Misc"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Status", IDM_STATUS
|
MENUITEM "&Status", IDM_STATUS
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#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_DISABLED 40300
|
||||||
|
#define IDM_CDROM_SCSI 40400
|
||||||
|
|
||||||
#define IDC_COMBO1 1000
|
#define IDC_COMBO1 1000
|
||||||
#define IDC_COMBOVID 1001
|
#define IDC_COMBOVID 1001
|
||||||
|
|||||||
76
src/win.c
76
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,2); /*Settings*/
|
m=GetSubMenu(menu,1); /*Disc*/
|
||||||
m=GetSubMenu(m,1); /*CD-ROM*/
|
m=GetSubMenu(m,9); /*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 */
|
||||||
@@ -617,15 +617,19 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||||||
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_MINIMIZEBOX);
|
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_MINIMIZEBOX);
|
||||||
|
|
||||||
// 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. */
|
||||||
if (!cdrom_enabled)
|
if (!cdrom_enabled)
|
||||||
CheckMenuItem(menu, IDM_CDROM_DISABLED, MF_CHECKED);
|
CheckMenuItem(menu, IDM_CDROM_DISABLED, MF_CHECKED);
|
||||||
else
|
|
||||||
{
|
if (scsi_cdrom_enabled)
|
||||||
|
CheckMenuItem(menu, IDM_CDROM_SCSI, 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
|
||||||
CheckMenuItem(menu, IDM_CDROM_REAL + cdrom_drive, MF_CHECKED);
|
CheckMenuItem(menu, IDM_CDROM_REAL + cdrom_drive, MF_CHECKED);
|
||||||
}
|
|
||||||
// pclog("Checking video resize menu item...\n");
|
// pclog("Checking video resize menu item...\n");
|
||||||
if (vid_resize) CheckMenuItem(menu, IDM_VID_RESIZE, MF_CHECKED);
|
if (vid_resize) CheckMenuItem(menu, IDM_VID_RESIZE, MF_CHECKED);
|
||||||
// pclog("Checking video API menu item...\n");
|
// pclog("Checking video API menu item...\n");
|
||||||
@@ -1131,6 +1135,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
pause = 0;
|
pause = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if 0
|
||||||
case IDM_CDROM_DISABLED:
|
case IDM_CDROM_DISABLED:
|
||||||
if (cdrom_enabled)
|
if (cdrom_enabled)
|
||||||
{
|
{
|
||||||
@@ -1161,14 +1166,43 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
pause = 0;
|
pause = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
case IDM_CDROM_DISABLED:
|
||||||
|
if (MessageBox(NULL,"This will reset 86Box!\nOkay to continue?","86Box",MB_OKCANCEL) != IDOK)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pause = 1;
|
||||||
|
Sleep(100);
|
||||||
|
cdrom_enabled ^= 1;
|
||||||
|
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, cdrom_enabled ? MF_UNCHECKED : MF_CHECKED);
|
||||||
|
saveconfig();
|
||||||
|
resetpchard();
|
||||||
|
pause = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IDM_CDROM_SCSI:
|
||||||
|
if (MessageBox(NULL,"This will reset 86Box!\nOkay to continue?","86Box",MB_OKCANCEL) != IDOK)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pause = 1;
|
||||||
|
Sleep(100);
|
||||||
|
scsi_cdrom_enabled ^= 1;
|
||||||
|
CheckMenuItem(hmenu, IDM_CDROM_DISABLED, scsi_cdrom_enabled ? MF_CHECKED : MF_UNCHECKED);
|
||||||
|
saveconfig();
|
||||||
|
resetpchard();
|
||||||
|
pause = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case IDM_CDROM_EMPTY:
|
case IDM_CDROM_EMPTY:
|
||||||
if (!cdrom_enabled)
|
/* if (!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;
|
||||||
}
|
} */
|
||||||
if ((cdrom_drive == 0) && cdrom_enabled)
|
// if ((cdrom_drive == 0) && cdrom_enabled)
|
||||||
|
if (cdrom_drive == 0)
|
||||||
{
|
{
|
||||||
/* Switch from empty to empty. Do nothing. */
|
/* Switch from empty to empty. Do nothing. */
|
||||||
break;
|
break;
|
||||||
@@ -1188,7 +1222,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
cdrom_drive=0;
|
cdrom_drive=0;
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_EMPTY, MF_CHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_EMPTY, MF_CHECKED);
|
||||||
saveconfig();
|
saveconfig();
|
||||||
if (!cdrom_enabled)
|
/* if (!cdrom_enabled)
|
||||||
{
|
{
|
||||||
pause = 1;
|
pause = 1;
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
@@ -1196,20 +1230,21 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
saveconfig();
|
saveconfig();
|
||||||
resetpchard();
|
resetpchard();
|
||||||
pause = 0;
|
pause = 0;
|
||||||
}
|
} */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDM_CDROM_ISO:
|
case IDM_CDROM_ISO:
|
||||||
if (!getfile(hwnd,"CD-ROM image (*.ISO)\0*.ISO\0All files (*.*)\0*.*\0",iso_path))
|
if (!getfile(hwnd,"CD-ROM image (*.ISO)\0*.ISO\0All files (*.*)\0*.*\0",iso_path))
|
||||||
{
|
{
|
||||||
if (!cdrom_enabled)
|
/* if (!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;
|
||||||
}
|
} */
|
||||||
old_cdrom_drive = cdrom_drive;
|
old_cdrom_drive = cdrom_drive;
|
||||||
strcpy(temp_iso_path, openfilestring);
|
strcpy(temp_iso_path, openfilestring);
|
||||||
if ((strcmp(iso_path, temp_iso_path) == 0) && (cdrom_drive == 200) && cdrom_enabled)
|
// if ((strcmp(iso_path, temp_iso_path) == 0) && (cdrom_drive == 200) && cdrom_enabled)
|
||||||
|
if ((strcmp(iso_path, temp_iso_path) == 0) && (cdrom_drive == 200))
|
||||||
{
|
{
|
||||||
/* Switching from ISO to the same ISO. Do nothing. */
|
/* Switching from ISO to the same ISO. Do nothing. */
|
||||||
break;
|
break;
|
||||||
@@ -1228,7 +1263,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
cdrom_drive = 200;
|
cdrom_drive = 200;
|
||||||
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_CHECKED);
|
CheckMenuItem(hmenu, IDM_CDROM_ISO, MF_CHECKED);
|
||||||
saveconfig();
|
saveconfig();
|
||||||
if (!cdrom_enabled)
|
/* if (!cdrom_enabled)
|
||||||
{
|
{
|
||||||
pause = 1;
|
pause = 1;
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
@@ -1236,20 +1271,21 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
saveconfig();
|
saveconfig();
|
||||||
resetpchard();
|
resetpchard();
|
||||||
pause = 0;
|
pause = 0;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (LOWORD(wParam)>IDM_CDROM_REAL && LOWORD(wParam)<(IDM_CDROM_REAL+100))
|
if (LOWORD(wParam)>IDM_CDROM_REAL && LOWORD(wParam)<(IDM_CDROM_REAL+100))
|
||||||
{
|
{
|
||||||
if (!cdrom_enabled)
|
/* if (!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;
|
||||||
}
|
} */
|
||||||
new_cdrom_drive = LOWORD(wParam)-IDM_CDROM_REAL;
|
new_cdrom_drive = LOWORD(wParam)-IDM_CDROM_REAL;
|
||||||
if ((cdrom_drive == new_cdrom_drive) && cdrom_enabled)
|
// if ((cdrom_drive == new_cdrom_drive) && cdrom_enabled)
|
||||||
|
if (cdrom_drive == new_cdrom_drive)
|
||||||
{
|
{
|
||||||
/* Switching to the same drive. Do nothing. */
|
/* Switching to the same drive. Do nothing. */
|
||||||
break;
|
break;
|
||||||
@@ -1269,7 +1305,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
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);
|
||||||
saveconfig();
|
saveconfig();
|
||||||
if (!cdrom_enabled)
|
/* if (!cdrom_enabled)
|
||||||
{
|
{
|
||||||
pause = 1;
|
pause = 1;
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
@@ -1277,7 +1313,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
saveconfig();
|
saveconfig();
|
||||||
resetpchard();
|
resetpchard();
|
||||||
pause = 0;
|
pause = 0;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user