parent
a36d78305a
commit
b7e63d2ee8
|
@ -193,6 +193,4 @@ void DivEngine::factoryReset() {
|
||||||
if (i>0) path+=fmt::sprintf(".%d",i);
|
if (i>0) path+=fmt::sprintf(".%d",i);
|
||||||
deleteFile(path.c_str());
|
deleteFile(path.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6573,6 +6573,7 @@ bool FurnaceGUI::loop() {
|
||||||
if (ImGui::Button(_("Yes"))) {
|
if (ImGui::Button(_("Yes"))) {
|
||||||
e->factoryReset();
|
e->factoryReset();
|
||||||
quit=true;
|
quit=true;
|
||||||
|
quitNoSave=true;
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
popDestColor();
|
popDestColor();
|
||||||
|
@ -8378,13 +8379,15 @@ void FurnaceGUI::commitState(DivConfig& conf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FurnaceGUI::finish(bool saveConfig) {
|
bool FurnaceGUI::finish(bool saveConfig) {
|
||||||
commitState(e->getConfObject());
|
if (!quitNoSave) {
|
||||||
if (userPresetsOpen) {
|
commitState(e->getConfObject());
|
||||||
saveUserPresets(true);
|
if (userPresetsOpen) {
|
||||||
}
|
saveUserPresets(true);
|
||||||
if (saveConfig) {
|
}
|
||||||
logI("saving config.");
|
if (saveConfig) {
|
||||||
e->saveConf();
|
logI("saving config.");
|
||||||
|
e->saveConf();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
rend->quitGUI();
|
rend->quitGUI();
|
||||||
ImGui_ImplSDL2_Shutdown();
|
ImGui_ImplSDL2_Shutdown();
|
||||||
|
@ -8484,6 +8487,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
replacePendingSample(false),
|
replacePendingSample(false),
|
||||||
displayExportingROM(false),
|
displayExportingROM(false),
|
||||||
displayExportingCS(false),
|
displayExportingCS(false),
|
||||||
|
quitNoSave(false),
|
||||||
changeCoarse(false),
|
changeCoarse(false),
|
||||||
mobileEdit(false),
|
mobileEdit(false),
|
||||||
killGraphics(false),
|
killGraphics(false),
|
||||||
|
|
|
@ -1677,6 +1677,7 @@ class FurnaceGUI {
|
||||||
bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString;
|
bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString;
|
||||||
bool displayPendingSamples, replacePendingSample;
|
bool displayPendingSamples, replacePendingSample;
|
||||||
bool displayExportingROM, displayExportingCS;
|
bool displayExportingROM, displayExportingCS;
|
||||||
|
bool quitNoSave;
|
||||||
bool changeCoarse;
|
bool changeCoarse;
|
||||||
bool mobileEdit;
|
bool mobileEdit;
|
||||||
bool killGraphics;
|
bool killGraphics;
|
||||||
|
|
Loading…
Reference in a new issue