diff --git a/src/pc/djui/djui_panel_host_mods.c b/src/pc/djui/djui_panel_host_mods.c index 3b73c465..7e4bdc82 100644 --- a/src/pc/djui/djui_panel_host_mods.c +++ b/src/pc/djui/djui_panel_host_mods.c @@ -18,6 +18,7 @@ static struct DjuiFlowLayout* sModLayout = NULL; static struct DjuiThreePanel* sDescriptionPanel = NULL; static struct DjuiText* sTooltip = NULL; static bool sWarned = false; +static bool sRomHacks = false; void djui_panel_host_mods_create(struct DjuiBase* caller); @@ -119,13 +120,15 @@ static void djui_panel_host_mods_destroy(struct DjuiBase* base) { } void djui_panel_host_mods_create(struct DjuiBase* caller) { - bool isRomHacks = caller != NULL ? caller->tag != 0 : false; + if (caller != NULL) { + sRomHacks = caller->tag != 0; + } mods_update_selectable(); djui_panel_host_mods_description_create(); struct DjuiThreePanel* panel = djui_panel_menu_create( - isRomHacks ? DLANG(HOST_MODS, ROMHACKS) : DLANG(HOST_MODS, MODS), + sRomHacks ? DLANG(HOST_MODS, ROMHACKS) : DLANG(HOST_MODS, MODS), true); struct DjuiBase* body = djui_three_panel_get_body(panel); @@ -135,7 +138,7 @@ void djui_panel_host_mods_create(struct DjuiBase* caller) { struct DjuiBase* layoutBase = &paginated->layout->base; for (int i = 0; i < gLocalMods.entryCount; i++) { struct Mod* mod = gLocalMods.entries[i]; - if (isRomHacks != (mod->incompatible && strstr(mod->incompatible, "romhack"))) { + if (sRomHacks != (mod->incompatible && strstr(mod->incompatible, "romhack"))) { continue; } struct DjuiCheckbox* checkbox = djui_checkbox_create(layoutBase, mod->name, &mod->enabled, djui_mod_checkbox_on_value_change);