Some plugin related fixes.

- Fixed loading of all plugins with one type using wildcard.
- Reduced maximum length of line when listing available modules for hdimage,
  network and sound.
This commit is contained in:
Volker Ruppert 2021-02-14 06:25:01 +00:00
parent 587c7b257b
commit 07f32da5a7
4 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ void bx_hdimage_ctl_c::list_modules(void)
list[0] = 0;
while (hdimage_mode_names[i] != NULL) {
len1 = strlen(hdimage_mode_names[i]);
if ((len + len1 + 1) > 60) {
if ((len + len1 + 1) > 58) {
BX_INFO((" %s", list));
list[0] = 0;
len = 0;

View File

@ -78,7 +78,7 @@ void bx_netmod_ctl_c::list_modules(void)
list[0] = 0;
while (net_module_names[i] != NULL) {
len1 = strlen(net_module_names[i]);
if ((len + len1 + 1) > 60) {
if ((len + len1 + 1) > 58) {
BX_INFO((" %s", list));
list[0] = 0;
len = 0;

View File

@ -84,7 +84,7 @@ void bx_soundmod_ctl_c::list_modules(void)
list[0] = 0;
while (sound_driver_names[i] != NULL) {
len1 = strlen(sound_driver_names[i]);
if ((len + len1 + 1) > 60) {
if ((len + len1 + 1) > 58) {
BX_INFO((" %s", list));
list[0] = 0;
len = 0;

View File

@ -749,7 +749,7 @@ bool bx_load_plugin(const char *name, plugintype_t type)
if (!strcmp(name, "*")) {
for (plugin = plugins; plugin; plugin = plugin->next) {
if (((type & plugin->type) != 0) && (plugin->loadtype != PLUGTYPE_NULL)) {
if (((type & plugin->type) != 0) && (plugin->loadtype == PLUGTYPE_NULL)) {
plugin_load(plugin->name, type);
}
}