diff --git a/bochs/gui/gui.cc b/bochs/gui/gui.cc index c25bb5856..ca4c8fb73 100644 --- a/bochs/gui/gui.cc +++ b/bochs/gui/gui.cc @@ -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"); diff --git a/bochs/iodev/devices.cc b/bochs/iodev/devices.cc index 7a7b63cf5..a269ae318 100644 --- a/bochs/iodev/devices.cc +++ b/bochs/iodev/devices.cc @@ -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);