diff --git a/src/gui/gui.h b/src/gui/gui.h index 617f3a419..135393ee6 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -70,6 +70,9 @@ #define FM_PREVIEW_SIZE 512 +#define CHECK_HIDDEN_SYSTEM(x) \ + (x==DIV_SYSTEM_YMU759 || x==DIV_SYSTEM_UPD1771C || x==DIV_SYSTEM_DUMMY || x==DIV_SYSTEM_SEGAPCM_COMPAT || x==DIV_SYSTEM_PONG) + enum FurnaceGUIRenderBackend { GUI_BACKEND_SDL=0, GUI_BACKEND_GL3, diff --git a/src/gui/presets.cpp b/src/gui/presets.cpp index 75e57c73f..cfb13973a 100644 --- a/src/gui/presets.cpp +++ b/src/gui/presets.cpp @@ -1336,11 +1336,6 @@ void FurnaceGUI::initSystemPresets() { ) } ); - ENTRY( - "Epoch Super Cassette Vision", { - CH(DIV_SYSTEM_UPD1771C, 1.0f, 0, "") - } - ); CATEGORY_END; CATEGORY_BEGIN(_("Arcade systems"),_("INSERT COIN")); @@ -1406,11 +1401,6 @@ void FurnaceGUI::initSystemPresets() { ENTRY( _("Atari"), {} ); - SUB_ENTRY( - _("Pong"), { - CH(DIV_SYSTEM_PONG, 1.0f, 0, "") - } - ); SUB_ENTRY( _("Atari Klax"), { CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=7") // 0.895MHz (3.579545MHz / 4) @@ -2775,13 +2765,6 @@ void FurnaceGUI::initSystemPresets() { CH(DIV_SYSTEM_OPL4_DRUMS, 1.0f, 0, "") } ); - if (settings.hiddenSystems) { - ENTRY( - _("Yamaha YMU759 (MA-2)"), { - CH(DIV_SYSTEM_YMU759, 1.0f, 0, "") - } - ); - } CATEGORY_END; CATEGORY_BEGIN(_("Square"),_("these chips generate square/pulse tones only (but may include noise).")); @@ -2882,11 +2865,6 @@ void FurnaceGUI::initSystemPresets() { CH(DIV_SYSTEM_MSM5232, 1.0f, 0, "") } ); - ENTRY( - _("Pong"), { - CH(DIV_SYSTEM_PONG, 1.0f, 0, "") - } - ); ENTRY( _("NEC D65010G031"), { CH(DIV_SYSTEM_PV1000, 1.0f, 0, "") @@ -3196,11 +3174,6 @@ void FurnaceGUI::initSystemPresets() { CH(DIV_SYSTEM_SUPERVISION, 1.0f, 0, "") } ); - ENTRY( - _("NEC μPD1771C"), { - CH(DIV_SYSTEM_UPD1771C, 1.0f, 0, "") - } - ); CATEGORY_END; CATEGORY_BEGIN(_("DefleMask-compatible"),_("these configurations are compatible with DefleMask.\nselect this if you need to save as .dmf or work with that program.")); diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index d1f57fc3d..8e16e6e4f 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1008,7 +1008,11 @@ void FurnaceGUI::drawSettings() { for (totalAvailSys=0; availableSystems[totalAvailSys]; totalAvailSys++); if (totalAvailSys>0) { for (int i=0; isystemToFileFur((DivSystem)availableSystems[rand()%totalAvailSys])); + DivSystem theSystem=DIV_SYSTEM_DUMMY; + do { + theSystem=(DivSystem)availableSystems[rand()%totalAvailSys]; + } while (!settings.hiddenSystems && CHECK_HIDDEN_SYSTEM(theSystem)); + settings.initialSys.set(fmt::sprintf("id%d",i),e->systemToFileFur(theSystem)); settings.initialSys.set(fmt::sprintf("vol%d",i),1.0f); settings.initialSys.set(fmt::sprintf("pan%d",i),0.0f); settings.initialSys.set(fmt::sprintf("fr%d",i),0.0f); diff --git a/src/gui/sysPicker.cpp b/src/gui/sysPicker.cpp index 6d10ac754..9aa322836 100644 --- a/src/gui/sysPicker.cpp +++ b/src/gui/sysPicker.cpp @@ -65,6 +65,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) { if (sysSearchQuery.empty()) { // display chip list for (int j=0; curSysSection[j]; j++) { + if (!settings.hiddenSystems && CHECK_HIDDEN_SYSTEM(curSysSection[j])) continue; ImGui::TableNextRow(); ImGui::TableNextColumn(); if (ImGui::Selectable(e->getSystemName((DivSystem)curSysSection[j]),false,0,ImVec2(500.0f*dpiScale,0.0f))) ret=(DivSystem)curSysSection[j]; @@ -75,6 +76,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) { } else { // display search results for (DivSystem i: sysSearchResults) { + if (!settings.hiddenSystems && CHECK_HIDDEN_SYSTEM(i)) continue; ImGui::TableNextRow(); ImGui::TableNextColumn(); if (ImGui::Selectable(e->getSystemName(i),false,0,ImVec2(500.0f*dpiScale,0.0f))) ret=i;