This commit is contained in:
tildearrow 2024-08-13 04:40:26 -05:00
parent b5e500d85d
commit e475b29ec3
5 changed files with 31 additions and 2 deletions

View file

@ -3916,6 +3916,9 @@ bool DivEngine::preInit(bool noSafeMode) {
// register systems
if (!systemsRegistered) registerSystems();
// register ROM exports
if (!romExportsRegistered) registerROMExports();
// TODO: re-enable with a better approach
// see issue #1581
/*

View file

@ -465,6 +465,7 @@ class DivEngine {
bool midiIsDirectProgram;
bool lowLatency;
bool systemsRegistered;
bool romExportsRegistered;
bool hasLoadedSomething;
bool midiOutClock;
bool midiOutTime;
@ -1365,6 +1366,7 @@ class DivEngine {
midiIsDirectProgram(false),
lowLatency(false),
systemsRegistered(false),
romExportsRegistered(false),
hasLoadedSomething(false),
midiOutClock(false),
midiOutTime(false),

View file

@ -242,6 +242,26 @@ void FurnaceGUI::drawExportVGM(bool onWindow) {
void FurnaceGUI::drawExportROM(bool onWindow) {
exitDisabledTimer=1;
const DivROMExportDef* def=e->getROMExportDef(romTarget);
ImGui::Text("select target:");
if (ImGui::BeginCombo("##ROMTarget",def==NULL?"<select one>":def->name)) {
for (int i=0; i<DIV_ROM_MAX; i++) {
const DivROMExportDef* newDef=e->getROMExportDef((DivROMExportOptions)i);
if (newDef!=NULL) {
if (ImGui::Selectable(newDef->name)) {
romTarget=(DivROMExportOptions)i;
}
}
}
ImGui::EndCombo();
}
if (def!=NULL) {
ImGui::Text("by %s",def->author);
ImGui::TextWrapped("%s",def->description);
}
if (onWindow) {
ImGui::Separator();

View file

@ -8349,7 +8349,8 @@ FurnaceGUI::FurnaceGUI():
curTutorial(-1),
curTutorialStep(0),
dmfExportVersion(0),
curExportType(GUI_EXPORT_NONE) {
curExportType(GUI_EXPORT_NONE),
romTarget(DIV_ROM_ABSTRACT) {
// value keys
valueKeys[SDLK_0]=0;
valueKeys[SDLK_1]=1;

View file

@ -2680,6 +2680,9 @@ class FurnaceGUI {
int dmfExportVersion;
FurnaceGUIExportTypes curExportType;
// ROM export specific
DivROMExportOptions romTarget;
// user presets window
std::vector<int> selectedUserPreset;