Load floppy plugin after the display plugin and simplified related init gui code.
This commit is contained in:
parent
00b2bbab2a
commit
42afaef2ba
@ -177,31 +177,20 @@ void bx_gui_c::init(int argc, char **argv, unsigned max_xres, unsigned max_yres,
|
||||
BX_SAVE_RESTORE_BMAP_X, BX_SAVE_RESTORE_BMAP_Y);
|
||||
|
||||
// Add the initial bitmaps to the headerbar, and enable callback routine, for use
|
||||
// when that bitmap is clicked on
|
||||
// when that bitmap is clicked on. The floppy and cdrom devices are not
|
||||
// initialized yet. so we just set the bitmaps to ejected for now.
|
||||
|
||||
// Floppy A:
|
||||
BX_GUI_THIS floppyA_status = (SIM->get_param_enum(BXPN_FLOPPYA_STATUS)->get() == BX_INSERTED);
|
||||
if (BX_GUI_THIS floppyA_status)
|
||||
BX_GUI_THIS floppyA_hbar_id = headerbar_bitmap(BX_GUI_THIS floppyA_bmap_id,
|
||||
BX_GRAVITY_LEFT, floppyA_handler);
|
||||
else
|
||||
BX_GUI_THIS floppyA_hbar_id = headerbar_bitmap(BX_GUI_THIS floppyA_eject_bmap_id,
|
||||
BX_GUI_THIS floppyA_hbar_id = headerbar_bitmap(BX_GUI_THIS floppyA_eject_bmap_id,
|
||||
BX_GRAVITY_LEFT, floppyA_handler);
|
||||
BX_GUI_THIS set_tooltip(BX_GUI_THIS floppyA_hbar_id, "Change floppy A: media");
|
||||
|
||||
// Floppy B:
|
||||
BX_GUI_THIS floppyB_status = (SIM->get_param_enum(BXPN_FLOPPYB_STATUS)->get() == BX_INSERTED);
|
||||
if (BX_GUI_THIS floppyB_status)
|
||||
BX_GUI_THIS floppyB_hbar_id = headerbar_bitmap(BX_GUI_THIS floppyB_bmap_id,
|
||||
BX_GRAVITY_LEFT, floppyB_handler);
|
||||
else
|
||||
BX_GUI_THIS floppyB_hbar_id = headerbar_bitmap(BX_GUI_THIS floppyB_eject_bmap_id,
|
||||
BX_GUI_THIS floppyB_hbar_id = headerbar_bitmap(BX_GUI_THIS floppyB_eject_bmap_id,
|
||||
BX_GRAVITY_LEFT, floppyB_handler);
|
||||
BX_GUI_THIS set_tooltip(BX_GUI_THIS floppyB_hbar_id, "Change floppy B: media");
|
||||
|
||||
// CDROM,
|
||||
// the harddrive object is not initialised yet,
|
||||
// so we just set the bitmap to ejected for now
|
||||
// First CD-ROM
|
||||
BX_GUI_THIS cdrom1_hbar_id = headerbar_bitmap(BX_GUI_THIS cdrom1_eject_bmap_id,
|
||||
BX_GRAVITY_LEFT, cdrom1_handler);
|
||||
BX_GUI_THIS set_tooltip(BX_GUI_THIS cdrom1_hbar_id, "Change first CDROM media");
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2013 The Bochs Project
|
||||
// Copyright (C) 2002-2014 The Bochs Project
|
||||
//
|
||||
// I/O port handlers API Copyright (C) 2003 by Frank Cornelis
|
||||
//
|
||||
@ -202,7 +202,6 @@ void bx_devices_c::init(BX_MEM_C *newmem)
|
||||
PLUG_load_plugin(dma, PLUGTYPE_CORE);
|
||||
PLUG_load_plugin(pic, PLUGTYPE_CORE);
|
||||
PLUG_load_plugin(pit, PLUGTYPE_CORE);
|
||||
PLUG_load_plugin(floppy, PLUGTYPE_CORE);
|
||||
vga_ext = SIM->get_param_string(BXPN_VGA_EXTENSION)->getptr();
|
||||
if (!strcmp(vga_ext, "cirrus")) {
|
||||
#if BX_SUPPORT_CLGD54XX
|
||||
@ -213,6 +212,7 @@ void bx_devices_c::init(BX_MEM_C *newmem)
|
||||
} else {
|
||||
PLUG_load_plugin(vga, PLUGTYPE_CORE);
|
||||
}
|
||||
PLUG_load_plugin(floppy, PLUGTYPE_CORE);
|
||||
|
||||
#if BX_SUPPORT_APIC
|
||||
PLUG_load_plugin(ioapic, PLUGTYPE_STANDARD);
|
||||
|
Loading…
Reference in New Issue
Block a user