- fixed unloading of support plugins
- TODO: reorganize plugin types, since there are now 3 subtypes of core plugins (gui, core devices and support for networking, sound, usb)
This commit is contained in:
parent
399168e37d
commit
78513089e4
@ -162,11 +162,13 @@ void bx_devices_c::init(BX_MEM_C *newmem)
|
|||||||
//
|
//
|
||||||
PLUG_load_plugin(hdimage, PLUGTYPE_CORE);
|
PLUG_load_plugin(hdimage, PLUGTYPE_CORE);
|
||||||
#if BX_NETWORKING
|
#if BX_NETWORKING
|
||||||
if (is_network_enabled())
|
network_enabled = is_network_enabled();
|
||||||
|
if (network_enabled)
|
||||||
PLUG_load_plugin(netmod, PLUGTYPE_CORE);
|
PLUG_load_plugin(netmod, PLUGTYPE_CORE);
|
||||||
#endif
|
#endif
|
||||||
#if BX_SUPPORT_SOUNDLOW
|
#if BX_SUPPORT_SOUNDLOW
|
||||||
if (is_sound_enabled())
|
sound_enabled = is_sound_enabled();
|
||||||
|
if (sound_enabled)
|
||||||
PLUG_load_plugin(soundmod, PLUGTYPE_CORE);
|
PLUG_load_plugin(soundmod, PLUGTYPE_CORE);
|
||||||
#endif
|
#endif
|
||||||
// PCI logic (i440FX)
|
// PCI logic (i440FX)
|
||||||
@ -175,7 +177,8 @@ void bx_devices_c::init(BX_MEM_C *newmem)
|
|||||||
PLUG_load_plugin(pci, PLUGTYPE_CORE);
|
PLUG_load_plugin(pci, PLUGTYPE_CORE);
|
||||||
PLUG_load_plugin(pci2isa, PLUGTYPE_CORE);
|
PLUG_load_plugin(pci2isa, PLUGTYPE_CORE);
|
||||||
#if BX_SUPPORT_PCIUSB
|
#if BX_SUPPORT_PCIUSB
|
||||||
if (is_usb_enabled())
|
usb_enabled = is_usb_enabled();
|
||||||
|
if (usb_enabled)
|
||||||
PLUG_load_plugin(usb_common, PLUGTYPE_CORE);
|
PLUG_load_plugin(usb_common, PLUGTYPE_CORE);
|
||||||
#endif
|
#endif
|
||||||
PLUG_load_plugin(acpi, PLUGTYPE_STANDARD);
|
PLUG_load_plugin(acpi, PLUGTYPE_STANDARD);
|
||||||
@ -316,15 +319,15 @@ void bx_devices_c::exit()
|
|||||||
bx_unload_core_plugins();
|
bx_unload_core_plugins();
|
||||||
PLUG_unload_plugin(hdimage);
|
PLUG_unload_plugin(hdimage);
|
||||||
#if BX_NETWORKING
|
#if BX_NETWORKING
|
||||||
if (is_network_enabled())
|
if (network_enabled)
|
||||||
PLUG_unload_plugin(netmod);
|
PLUG_unload_plugin(netmod);
|
||||||
#endif
|
#endif
|
||||||
#if BX_SUPPORT_SOUNDLOW
|
#if BX_SUPPORT_SOUNDLOW
|
||||||
if (is_sound_enabled())
|
if (sound_enabled)
|
||||||
PLUG_unload_plugin(soundmod);
|
PLUG_unload_plugin(soundmod);
|
||||||
#endif
|
#endif
|
||||||
#if BX_SUPPORT_PCIUSB
|
#if BX_SUPPORT_PCIUSB
|
||||||
if (is_usb_enabled())
|
if (usb_enabled)
|
||||||
PLUG_unload_plugin(usb_common);
|
PLUG_unload_plugin(usb_common);
|
||||||
#endif
|
#endif
|
||||||
init_stubs();
|
init_stubs();
|
||||||
|
@ -581,6 +581,10 @@ private:
|
|||||||
|
|
||||||
int timer_handle;
|
int timer_handle;
|
||||||
|
|
||||||
|
bx_bool network_enabled;
|
||||||
|
bx_bool sound_enabled;
|
||||||
|
bx_bool usb_enabled;
|
||||||
|
|
||||||
bx_bool is_harddrv_enabled();
|
bx_bool is_harddrv_enabled();
|
||||||
bx_bool is_network_enabled();
|
bx_bool is_network_enabled();
|
||||||
bx_bool is_sound_enabled();
|
bx_bool is_sound_enabled();
|
||||||
|
Loading…
Reference in New Issue
Block a user