From 8da108580947af1728b0ebb144f3369e549641a9 Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Thu, 17 Aug 2023 22:28:17 +0400 Subject: [PATCH 1/6] separate cores + selection for playback and export --- src/engine/engine.cpp | 24 ++++++++ src/gui/gui.h | 16 +++++ src/gui/settings.cpp | 136 ++++++++++++++++++++++++++++++++++-------- 3 files changed, 152 insertions(+), 24 deletions(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 477487709..0d6b4b1db 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -821,6 +821,18 @@ void DivEngine::runExportThread() { size_t fadeOutSamples=got.rate*exportFadeOut; size_t curFadeOutSample=0; bool isFadingOut=false; + + setConf("arcadeCore",getConfInt("arcadeCoreRender",0)); + setConf("ym2612Core",getConfInt("ym2612CoreRender",0)); + setConf("snCore",getConfInt("snCoreRender",0)); + setConf("nesCore",getConfInt("nesCoreRender",0)); + setConf("fdsCore",getConfInt("fdsCoreRender",0)); + setConf("c64Core",getConfInt("c64CoreRender",0)); + setConf("pokeyCore",getConfInt("pokeyCoreRender",0)); + setConf("opnCore",getConfInt("opnCoreRender",0)); + + switchMaster(true); + switch (exportMode) { case DIV_EXPORT_MODE_ONE: { SNDFILE* sf; @@ -1144,6 +1156,18 @@ void DivEngine::runExportThread() { break; } } + + setConf("arcadeCore",getConfInt("arcadeCorePlayback",0)); + setConf("ym2612Core",getConfInt("ym2612CorePlayback",0)); + setConf("snCore",getConfInt("snCorePlayback",0)); + setConf("nesCore",getConfInt("nesCorePlayback",0)); + setConf("fdsCore",getConfInt("fdsCorePlayback",0)); + setConf("c64Core",getConfInt("c64CorePlayback",0)); + setConf("pokeyCore",getConfInt("pokeyCorePlayback",0)); + setConf("opnCore",getConfInt("opnCorePlayback",0)); + + switchMaster(true); + stopExport=false; } #else diff --git a/src/gui/gui.h b/src/gui/gui.h index c722bf14f..f9a6d5173 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1419,6 +1419,22 @@ class FurnaceGUI { int c64Core; int pokeyCore; int opnCore; + int arcadeCorePlayback; + int ym2612CorePlayback; + int snCorePlayback; + int nesCorePlayback; + int fdsCorePlayback; + int c64CorePlayback; + int pokeyCorePlayback; + int opnCorePlayback; + int arcadeCoreRender; + int ym2612CoreRender; + int snCoreRender; + int nesCoreRender; + int fdsCoreRender; + int c64CoreRender; + int pokeyCoreRender; + int opnCoreRender; int pcSpeakerOutMethod; String yrw801Path; String tg100Path; diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 8b7348b09..ccd79cdaf 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1192,42 +1192,74 @@ void FurnaceGUI::drawSettings() { ImGui::AlignTextToFramePadding(); ImGui::Text("Arcade/YM2151 core"); ImGui::SameLine(); - ImGui::Combo("##ArcadeCore",&settings.arcadeCore,arcadeCores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##ArcadeCorePlayback",&settings.arcadeCorePlayback,arcadeCores,2); + ImGui::SameLine(); + ImGui::Combo("##ArcadeCoreRender",&settings.arcadeCoreRender,arcadeCores,2); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("Genesis/YM2612 core"); ImGui::SameLine(); - ImGui::Combo("##YM2612Core",&settings.ym2612Core,ym2612Cores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##YM2612CorePlayback",&settings.ym2612CorePlayback,ym2612Cores,2); + ImGui::SameLine(); + ImGui::Combo("##YM2612CoreRender",&settings.ym2612CoreRender,ym2612Cores,2); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("SN76489 core"); ImGui::SameLine(); - ImGui::Combo("##SNCore",&settings.snCore,snCores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##SNCorePlayback",&settings.snCorePlayback,snCores,2); + ImGui::SameLine(); + ImGui::Combo("##SNCoreRender",&settings.snCoreRender,snCores,2); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("NES core"); ImGui::SameLine(); - ImGui::Combo("##NESCore",&settings.nesCore,nesCores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##NESCorePlayback",&settings.nesCorePlayback,nesCores,2); + ImGui::SameLine(); + ImGui::Combo("##NESCoreRender",&settings.nesCoreRender,nesCores,2); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("FDS core"); ImGui::SameLine(); - ImGui::Combo("##FDSCore",&settings.fdsCore,nesCores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##FDSCorePlayback",&settings.fdsCorePlayback,nesCores,2); + ImGui::SameLine(); + ImGui::Combo("##FDSCoreRender",&settings.fdsCoreRender,nesCores,2); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("SID core"); ImGui::SameLine(); - ImGui::Combo("##C64Core",&settings.c64Core,c64Cores,3); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##C64CorePlayback",&settings.c64CorePlayback,c64Cores,3); + ImGui::SameLine(); + ImGui::Combo("##C64CoreRender",&settings.c64CoreRender,c64Cores,3); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("POKEY core"); ImGui::SameLine(); - ImGui::Combo("##POKEYCore",&settings.pokeyCore,pokeyCores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##POKEYCorePlayback",&settings.pokeyCorePlayback,pokeyCores,2); + ImGui::SameLine(); + ImGui::Combo("##POKEYCoreRender",&settings.pokeyCoreRender,pokeyCores,2); + ImGui::PopItemWidth(); ImGui::AlignTextToFramePadding(); ImGui::Text("OPN/OPNA/OPNB cores"); ImGui::SameLine(); - ImGui::Combo("##OPNCore",&settings.opnCore,opnCores,2); + ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); + ImGui::Combo("##OPNCorePlayback",&settings.opnCorePlayback,opnCores,2); + ImGui::SameLine(); + ImGui::Combo("##OPNCoreRender",&settings.opnCoreRender,opnCores,2); + ImGui::PopItemWidth(); ImGui::Separator(); @@ -2930,14 +2962,30 @@ void FurnaceGUI::syncSettings() { settings.audioQuality=e->getConfInt("audioQuality",0); settings.audioBufSize=e->getConfInt("audioBufSize",1024); settings.audioRate=e->getConfInt("audioRate",44100); - settings.arcadeCore=e->getConfInt("arcadeCore",0); - settings.ym2612Core=e->getConfInt("ym2612Core",0); - settings.snCore=e->getConfInt("snCore",0); - settings.nesCore=e->getConfInt("nesCore",0); - settings.fdsCore=e->getConfInt("fdsCore",0); - settings.c64Core=e->getConfInt("c64Core",0); - settings.pokeyCore=e->getConfInt("pokeyCore",1); - settings.opnCore=e->getConfInt("opnCore",1); + settings.arcadeCore=settings.arcadeCorePlayback; + settings.ym2612Core=settings.ym2612CorePlayback; + settings.snCore=settings.snCorePlayback; + settings.nesCore=settings.nesCorePlayback; + settings.fdsCore=settings.fdsCorePlayback; + settings.c64Core=settings.c64CorePlayback; + settings.pokeyCore=settings.pokeyCorePlayback; + settings.opnCore=settings.opnCorePlayback; + settings.arcadeCorePlayback=e->getConfInt("arcadeCorePlayback",0); + settings.ym2612CorePlayback=e->getConfInt("ym2612CorePlayback",0); + settings.snCorePlayback=e->getConfInt("snCorePlayback",0); + settings.nesCorePlayback=e->getConfInt("nesCorePlayback",0); + settings.fdsCorePlayback=e->getConfInt("fdsCorePlayback",0); + settings.c64CorePlayback=e->getConfInt("c64CorePlayback",0); + settings.pokeyCorePlayback=e->getConfInt("pokeyCorePlayback",1); + settings.opnCorePlayback=e->getConfInt("opnCorePlayback",1); + settings.arcadeCoreRender=e->getConfInt("arcadeCoreRender",0); + settings.ym2612CoreRender=e->getConfInt("ym2612CoreRender",0); + settings.snCoreRender=e->getConfInt("snCoreRender",0); + settings.nesCoreRender=e->getConfInt("nesCoreRender",0); + settings.fdsCoreRender=e->getConfInt("fdsCoreRender",0); + settings.c64CoreRender=e->getConfInt("c64CoreRender",0); + settings.pokeyCoreRender=e->getConfInt("pokeyCoreRender",1); + settings.opnCoreRender=e->getConfInt("opnCoreRender",1); settings.pcSpeakerOutMethod=e->getConfInt("pcSpeakerOutMethod",0); settings.yrw801Path=e->getConfString("yrw801Path",""); settings.tg100Path=e->getConfString("tg100Path",""); @@ -3098,6 +3146,22 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.c64Core,0,2); clampSetting(settings.pokeyCore,0,1); clampSetting(settings.opnCore,0,1); + clampSetting(settings.arcadeCorePlayback,0,1); + clampSetting(settings.ym2612CorePlayback,0,1); + clampSetting(settings.snCorePlayback,0,1); + clampSetting(settings.nesCorePlayback,0,1); + clampSetting(settings.fdsCorePlayback,0,1); + clampSetting(settings.c64CorePlayback,0,2); + clampSetting(settings.pokeyCorePlayback,0,1); + clampSetting(settings.opnCorePlayback,0,1); + clampSetting(settings.arcadeCoreRender,0,1); + clampSetting(settings.ym2612CoreRender,0,1); + clampSetting(settings.snCoreRender,0,1); + clampSetting(settings.nesCoreRender,0,1); + clampSetting(settings.fdsCoreRender,0,1); + clampSetting(settings.c64CoreRender,0,2); + clampSetting(settings.pokeyCoreRender,0,1); + clampSetting(settings.opnCoreRender,0,1); clampSetting(settings.pcSpeakerOutMethod,0,4); clampSetting(settings.mainFont,0,6); clampSetting(settings.patFont,0,6); @@ -3280,14 +3344,22 @@ void FurnaceGUI::commitSettings() { settings.mu5Path!=e->getConfString("mu5Path",""); bool coresChanged=( - settings.arcadeCore!=e->getConfInt("arcadeCore",0) || - settings.ym2612Core!=e->getConfInt("ym2612Core",0) || - settings.snCore!=e->getConfInt("snCore",0) || - settings.nesCore!=e->getConfInt("nesCore",0) || - settings.fdsCore!=e->getConfInt("fdsCore",0) || - settings.c64Core!=e->getConfInt("c64Core",0) || - settings.pokeyCore!=e->getConfInt("pokeyCore",1) || - settings.opnCore!=e->getConfInt("opnCore",1) + settings.arcadeCorePlayback!=e->getConfInt("arcadeCore",0) || + settings.ym2612CorePlayback!=e->getConfInt("ym2612Core",0) || + settings.snCorePlayback!=e->getConfInt("snCore",0) || + settings.nesCorePlayback!=e->getConfInt("nesCore",0) || + settings.fdsCorePlayback!=e->getConfInt("fdsCore",0) || + settings.c64CorePlayback!=e->getConfInt("c64Core",0) || + settings.pokeyCorePlayback!=e->getConfInt("pokeyCore",1) || + settings.opnCorePlayback!=e->getConfInt("opnCore",1) || + settings.arcadeCoreRender!=e->getConfInt("arcadeCore",0) || + settings.ym2612CoreRender!=e->getConfInt("ym2612Core",0) || + settings.snCoreRender!=e->getConfInt("snCore",0) || + settings.nesCoreRender!=e->getConfInt("nesCore",0) || + settings.fdsCoreRender!=e->getConfInt("fdsCore",0) || + settings.c64CoreRender!=e->getConfInt("c64Core",0) || + settings.pokeyCoreRender!=e->getConfInt("pokeyCore",1) || + settings.opnCoreRender!=e->getConfInt("opnCore",1) ); e->setConf("mainFontSize",settings.mainFontSize); @@ -3312,6 +3384,22 @@ void FurnaceGUI::commitSettings() { e->setConf("c64Core",settings.c64Core); e->setConf("pokeyCore",settings.pokeyCore); e->setConf("opnCore",settings.opnCore); + e->setConf("arcadeCorePlayback",settings.arcadeCorePlayback); + e->setConf("ym2612CorePlayback",settings.ym2612CorePlayback); + e->setConf("snCorePlayback",settings.snCorePlayback); + e->setConf("nesCorePlayback",settings.nesCorePlayback); + e->setConf("fdsCorePlayback",settings.fdsCorePlayback); + e->setConf("c64CorePlayback",settings.c64CorePlayback); + e->setConf("pokeyCorePlayback",settings.pokeyCorePlayback); + e->setConf("opnCorePlayback",settings.opnCorePlayback); + e->setConf("arcadeCoreRender",settings.arcadeCoreRender); + e->setConf("ym2612CoreRender",settings.ym2612CoreRender); + e->setConf("snCoreRender",settings.snCoreRender); + e->setConf("nesCoreRender",settings.nesCoreRender); + e->setConf("fdsCoreRender",settings.fdsCoreRender); + e->setConf("c64CoreRender",settings.c64CoreRender); + e->setConf("pokeyCoreRender",settings.pokeyCoreRender); + e->setConf("opnCoreRender",settings.opnCoreRender); e->setConf("pcSpeakerOutMethod",settings.pcSpeakerOutMethod); e->setConf("yrw801Path",settings.yrw801Path); e->setConf("tg100Path",settings.tg100Path); From 36e2444b115c47bd151a4a7fe8febb75bba2a823 Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Thu, 17 Aug 2023 22:48:46 +0400 Subject: [PATCH 2/6] add logs --- src/engine/engine.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 0d6b4b1db..282c450a3 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -831,7 +831,13 @@ void DivEngine::runExportThread() { setConf("pokeyCore",getConfInt("pokeyCoreRender",0)); setConf("opnCore",getConfInt("opnCoreRender",0)); - switchMaster(true); + if (switchMaster(true)) { + logI("successfully switched to render cores!"); + } else { + logE("could not switch to render cores!"); + exporting = false; + return; + } switch (exportMode) { case DIV_EXPORT_MODE_ONE: { @@ -1166,7 +1172,11 @@ void DivEngine::runExportThread() { setConf("pokeyCore",getConfInt("pokeyCorePlayback",0)); setConf("opnCore",getConfInt("opnCorePlayback",0)); - switchMaster(true); + if (switchMaster(true)) { + logI("successfully switched to playback cores!"); + } else { + logE("could not switch to playback cores!"); + } stopExport=false; } From 74e803d4e9a16282133920f2decdc979ab5aac7d Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Fri, 18 Aug 2023 10:40:18 +0400 Subject: [PATCH 3/6] redo core switching --- src/engine/dispatchContainer.cpp | 122 +++++++++++++++++++++++++------ src/engine/engine.cpp | 40 ++-------- src/engine/engine.h | 4 +- src/gui/gui.h | 8 -- src/gui/settings.cpp | 72 ++++++------------ 5 files changed, 134 insertions(+), 112 deletions(-) diff --git a/src/engine/dispatchContainer.cpp b/src/engine/dispatchContainer.cpp index ac92b23f4..8883243e7 100644 --- a/src/engine/dispatchContainer.cpp +++ b/src/engine/dispatchContainer.cpp @@ -219,7 +219,7 @@ void DivDispatchContainer::clear() { } } -void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, const DivConfig& flags) { +void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, const DivConfig& flags, bool isRender) { // quit if we already initialized if (dispatch!=NULL) return; @@ -231,33 +231,57 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do break; case DIV_SYSTEM_YM2612: dispatch=new DivPlatformGenesis; - ((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + if (isRender) { + ((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612CoreRender",0)); + } else { + ((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + } ((DivPlatformGenesis*)dispatch)->setSoftPCM(false); break; case DIV_SYSTEM_YM2612_EXT: dispatch=new DivPlatformGenesisExt; - ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + if (isRender) { + ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612CoreRender",0)); + } else { + ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + } ((DivPlatformGenesisExt*)dispatch)->setSoftPCM(false); break; case DIV_SYSTEM_YM2612_CSM: dispatch=new DivPlatformGenesisExt; - ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + if (isRender) { + ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612CoreRender",0)); + } else { + ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + } ((DivPlatformGenesisExt*)dispatch)->setSoftPCM(false); ((DivPlatformGenesisExt*)dispatch)->setCSMChannel(6); break; case DIV_SYSTEM_YM2612_DUALPCM: dispatch=new DivPlatformGenesis; - ((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + if (isRender) { + ((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612CoreRender",0)); + } else { + ((DivPlatformGenesis*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + } ((DivPlatformGenesis*)dispatch)->setSoftPCM(true); break; case DIV_SYSTEM_YM2612_DUALPCM_EXT: dispatch=new DivPlatformGenesisExt; - ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + if (isRender) { + ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612CoreRender",0)); + } else { + ((DivPlatformGenesisExt*)dispatch)->setYMFM(eng->getConfInt("ym2612Core",0)); + } ((DivPlatformGenesisExt*)dispatch)->setSoftPCM(true); break; case DIV_SYSTEM_SMS: dispatch=new DivPlatformSMS; - ((DivPlatformSMS*)dispatch)->setNuked(eng->getConfInt("snCore",0)); + if (isRender) { + ((DivPlatformSMS*)dispatch)->setNuked(eng->getConfInt("snCoreRender",0)); + } else { + ((DivPlatformSMS*)dispatch)->setNuked(eng->getConfInt("snCore",0)); + } break; case DIV_SYSTEM_GB: dispatch=new DivPlatformGB; @@ -267,39 +291,71 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do break; case DIV_SYSTEM_NES: dispatch=new DivPlatformNES; - ((DivPlatformNES*)dispatch)->setNSFPlay(eng->getConfInt("nesCore",0)==1); + if (isRender) { + ((DivPlatformNES*)dispatch)->setNSFPlay(eng->getConfInt("nesCoreRender",0)==1); + } else { + ((DivPlatformNES*)dispatch)->setNSFPlay(eng->getConfInt("nesCore",0)==1); + } break; case DIV_SYSTEM_C64_6581: dispatch=new DivPlatformC64; - ((DivPlatformC64*)dispatch)->setCore(eng->getConfInt("c64Core",0)); + if (isRender) { + ((DivPlatformC64*)dispatch)->setCore(eng->getConfInt("c64CoreRender",0)); + } else { + ((DivPlatformC64*)dispatch)->setCore(eng->getConfInt("c64Core",0)); + } ((DivPlatformC64*)dispatch)->setChipModel(true); break; case DIV_SYSTEM_C64_8580: dispatch=new DivPlatformC64; - ((DivPlatformC64*)dispatch)->setCore(eng->getConfInt("c64Core",0)); + if (isRender) { + ((DivPlatformC64*)dispatch)->setCore(eng->getConfInt("c64CoreRender",0)); + } else { + ((DivPlatformC64*)dispatch)->setCore(eng->getConfInt("c64Core",0)); + } ((DivPlatformC64*)dispatch)->setChipModel(false); break; case DIV_SYSTEM_YM2151: dispatch=new DivPlatformArcade; - ((DivPlatformArcade*)dispatch)->setYMFM(eng->getConfInt("arcadeCore",0)==0); + if (isRender) { + ((DivPlatformArcade*)dispatch)->setYMFM(eng->getConfInt("arcadeCoreRender",0)==0); + } else { + ((DivPlatformArcade*)dispatch)->setYMFM(eng->getConfInt("arcadeCore",0)==0); + } break; case DIV_SYSTEM_YM2610: case DIV_SYSTEM_YM2610_FULL: dispatch=new DivPlatformYM2610; - ((DivPlatformYM2610*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2610*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2610*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_YM2610_EXT: case DIV_SYSTEM_YM2610_FULL_EXT: dispatch=new DivPlatformYM2610Ext; - ((DivPlatformYM2610Ext*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2610Ext*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2610Ext*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_YM2610B: dispatch=new DivPlatformYM2610B; - ((DivPlatformYM2610B*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2610B*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2610B*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_YM2610B_EXT: dispatch=new DivPlatformYM2610BExt; - ((DivPlatformYM2610BExt*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2610BExt*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2610BExt*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_AMIGA: dispatch=new DivPlatformAmiga; @@ -312,26 +368,46 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do break; case DIV_SYSTEM_FDS: dispatch=new DivPlatformFDS; - ((DivPlatformFDS*)dispatch)->setNSFPlay(eng->getConfInt("fdsCore",0)==1); + if (isRender) { + ((DivPlatformFDS*)dispatch)->setNSFPlay(eng->getConfInt("fdsCoreRender",0)==1); + } else { + ((DivPlatformFDS*)dispatch)->setNSFPlay(eng->getConfInt("fdsCore",0)==1); + } break; case DIV_SYSTEM_TIA: dispatch=new DivPlatformTIA; break; case DIV_SYSTEM_YM2203: dispatch=new DivPlatformYM2203; - ((DivPlatformYM2203*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2203*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2203*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_YM2203_EXT: dispatch=new DivPlatformYM2203Ext; - ((DivPlatformYM2203Ext*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2203Ext*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2203Ext*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_YM2608: dispatch=new DivPlatformYM2608; - ((DivPlatformYM2608*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2608*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2608*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_YM2608_EXT: dispatch=new DivPlatformYM2608Ext; - ((DivPlatformYM2608Ext*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + if (isRender) { + ((DivPlatformYM2608Ext*)dispatch)->setCombo(eng->getConfInt("opnCoreRender",1)==1); + } else { + ((DivPlatformYM2608Ext*)dispatch)->setCombo(eng->getConfInt("opnCore",1)==1); + } break; case DIV_SYSTEM_OPLL: case DIV_SYSTEM_OPLL_DRUMS: @@ -396,7 +472,11 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do break; case DIV_SYSTEM_POKEY: dispatch=new DivPlatformPOKEY; - ((DivPlatformPOKEY*)dispatch)->setAltASAP(eng->getConfInt("pokeyCore",1)==1); + if (isRender) { + ((DivPlatformPOKEY*)dispatch)->setAltASAP(eng->getConfInt("pokeyCoreRender",1)==1); + } else { + ((DivPlatformPOKEY*)dispatch)->setAltASAP(eng->getConfInt("pokeyCore",1)==1); + } break; case DIV_SYSTEM_QSOUND: dispatch=new DivPlatformQSound; diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 282c450a3..6cfd1a5e4 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -822,22 +822,8 @@ void DivEngine::runExportThread() { size_t curFadeOutSample=0; bool isFadingOut=false; - setConf("arcadeCore",getConfInt("arcadeCoreRender",0)); - setConf("ym2612Core",getConfInt("ym2612CoreRender",0)); - setConf("snCore",getConfInt("snCoreRender",0)); - setConf("nesCore",getConfInt("nesCoreRender",0)); - setConf("fdsCore",getConfInt("fdsCoreRender",0)); - setConf("c64Core",getConfInt("c64CoreRender",0)); - setConf("pokeyCore",getConfInt("pokeyCoreRender",0)); - setConf("opnCore",getConfInt("opnCoreRender",0)); - - if (switchMaster(true)) { - logI("successfully switched to render cores!"); - } else { - logE("could not switch to render cores!"); - exporting = false; - return; - } + quitDispatch(); + initDispatch(true); switch (exportMode) { case DIV_EXPORT_MODE_ONE: { @@ -1163,21 +1149,8 @@ void DivEngine::runExportThread() { } } - setConf("arcadeCore",getConfInt("arcadeCorePlayback",0)); - setConf("ym2612Core",getConfInt("ym2612CorePlayback",0)); - setConf("snCore",getConfInt("snCorePlayback",0)); - setConf("nesCore",getConfInt("nesCorePlayback",0)); - setConf("fdsCore",getConfInt("fdsCorePlayback",0)); - setConf("c64Core",getConfInt("c64CorePlayback",0)); - setConf("pokeyCore",getConfInt("pokeyCorePlayback",0)); - setConf("opnCore",getConfInt("opnCorePlayback",0)); - - if (switchMaster(true)) { - logI("successfully switched to playback cores!"); - } else { - logE("could not switch to playback cores!"); - } - + quitDispatch(); + initDispatch(false); stopExport=false; } #else @@ -4600,10 +4573,11 @@ void DivEngine::rescanAudioDevices() { } } -void DivEngine::initDispatch() { +void DivEngine::initDispatch(bool isRender) { BUSY_BEGIN; + if (isRender) logI("render cores set"); for (int i=0; igetConfInt("audioQuality",0); settings.audioBufSize=e->getConfInt("audioBufSize",1024); settings.audioRate=e->getConfInt("audioRate",44100); - settings.arcadeCore=settings.arcadeCorePlayback; - settings.ym2612Core=settings.ym2612CorePlayback; - settings.snCore=settings.snCorePlayback; - settings.nesCore=settings.nesCorePlayback; - settings.fdsCore=settings.fdsCorePlayback; - settings.c64Core=settings.c64CorePlayback; - settings.pokeyCore=settings.pokeyCorePlayback; - settings.opnCore=settings.opnCorePlayback; - settings.arcadeCorePlayback=e->getConfInt("arcadeCorePlayback",0); - settings.ym2612CorePlayback=e->getConfInt("ym2612CorePlayback",0); - settings.snCorePlayback=e->getConfInt("snCorePlayback",0); - settings.nesCorePlayback=e->getConfInt("nesCorePlayback",0); - settings.fdsCorePlayback=e->getConfInt("fdsCorePlayback",0); - settings.c64CorePlayback=e->getConfInt("c64CorePlayback",0); - settings.pokeyCorePlayback=e->getConfInt("pokeyCorePlayback",1); - settings.opnCorePlayback=e->getConfInt("opnCorePlayback",1); + settings.arcadeCore=e->getConfInt("arcadeCore",0); + settings.ym2612Core=e->getConfInt("ym2612Core",0); + settings.snCore=e->getConfInt("snCore",0); + settings.nesCore=e->getConfInt("nesCore",0); + settings.fdsCore=e->getConfInt("fdsCore",0); + settings.c64Core=e->getConfInt("c64Core",0); + settings.pokeyCore=e->getConfInt("pokeyCore",1); + settings.opnCore=e->getConfInt("opnCore",1); settings.arcadeCoreRender=e->getConfInt("arcadeCoreRender",0); settings.ym2612CoreRender=e->getConfInt("ym2612CoreRender",0); settings.snCoreRender=e->getConfInt("snCoreRender",0); @@ -3146,14 +3138,6 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.c64Core,0,2); clampSetting(settings.pokeyCore,0,1); clampSetting(settings.opnCore,0,1); - clampSetting(settings.arcadeCorePlayback,0,1); - clampSetting(settings.ym2612CorePlayback,0,1); - clampSetting(settings.snCorePlayback,0,1); - clampSetting(settings.nesCorePlayback,0,1); - clampSetting(settings.fdsCorePlayback,0,1); - clampSetting(settings.c64CorePlayback,0,2); - clampSetting(settings.pokeyCorePlayback,0,1); - clampSetting(settings.opnCorePlayback,0,1); clampSetting(settings.arcadeCoreRender,0,1); clampSetting(settings.ym2612CoreRender,0,1); clampSetting(settings.snCoreRender,0,1); @@ -3344,14 +3328,14 @@ void FurnaceGUI::commitSettings() { settings.mu5Path!=e->getConfString("mu5Path",""); bool coresChanged=( - settings.arcadeCorePlayback!=e->getConfInt("arcadeCore",0) || - settings.ym2612CorePlayback!=e->getConfInt("ym2612Core",0) || - settings.snCorePlayback!=e->getConfInt("snCore",0) || - settings.nesCorePlayback!=e->getConfInt("nesCore",0) || - settings.fdsCorePlayback!=e->getConfInt("fdsCore",0) || - settings.c64CorePlayback!=e->getConfInt("c64Core",0) || - settings.pokeyCorePlayback!=e->getConfInt("pokeyCore",1) || - settings.opnCorePlayback!=e->getConfInt("opnCore",1) || + settings.arcadeCore!=e->getConfInt("arcadeCore",0) || + settings.ym2612Core!=e->getConfInt("ym2612Core",0) || + settings.snCore!=e->getConfInt("snCore",0) || + settings.nesCore!=e->getConfInt("nesCore",0) || + settings.fdsCore!=e->getConfInt("fdsCore",0) || + settings.c64Core!=e->getConfInt("c64Core",0) || + settings.pokeyCore!=e->getConfInt("pokeyCore",1) || + settings.opnCore!=e->getConfInt("opnCore",1) || settings.arcadeCoreRender!=e->getConfInt("arcadeCore",0) || settings.ym2612CoreRender!=e->getConfInt("ym2612Core",0) || settings.snCoreRender!=e->getConfInt("snCore",0) || @@ -3384,14 +3368,6 @@ void FurnaceGUI::commitSettings() { e->setConf("c64Core",settings.c64Core); e->setConf("pokeyCore",settings.pokeyCore); e->setConf("opnCore",settings.opnCore); - e->setConf("arcadeCorePlayback",settings.arcadeCorePlayback); - e->setConf("ym2612CorePlayback",settings.ym2612CorePlayback); - e->setConf("snCorePlayback",settings.snCorePlayback); - e->setConf("nesCorePlayback",settings.nesCorePlayback); - e->setConf("fdsCorePlayback",settings.fdsCorePlayback); - e->setConf("c64CorePlayback",settings.c64CorePlayback); - e->setConf("pokeyCorePlayback",settings.pokeyCorePlayback); - e->setConf("opnCorePlayback",settings.opnCorePlayback); e->setConf("arcadeCoreRender",settings.arcadeCoreRender); e->setConf("ym2612CoreRender",settings.ym2612CoreRender); e->setConf("snCoreRender",settings.snCoreRender); From eb820eb9af06541933cbaf8b00b6b51ab41bc458 Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Fri, 18 Aug 2023 11:34:08 +0400 Subject: [PATCH 4/6] make table --- src/gui/settings.cpp | 166 ++++++++++++++++++++++++++----------------- 1 file changed, 102 insertions(+), 64 deletions(-) diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 084539880..856003853 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1189,78 +1189,116 @@ void FurnaceGUI::drawSettings() { CONFIG_SECTION("Emulation") { // SUBSECTION LAYOUT CONFIG_SUBSECTION("Cores"); - ImGui::AlignTextToFramePadding(); - ImGui::Text("Arcade/YM2151 core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##ArcadeCore",&settings.arcadeCore,arcadeCores,2); - ImGui::SameLine(); - ImGui::Combo("##ArcadeCoreRender",&settings.arcadeCoreRender,arcadeCores,2); - ImGui::PopItemWidth(); + if (ImGui::BeginTable("##Cores",3)) { + ImGui::TableSetupColumn("##System",ImGuiTableColumnFlags_WidthFixed); + ImGui::TableSetupColumn("##PlaybackCores",ImGuiTableColumnFlags_WidthStretch); + ImGui::TableSetupColumn("##RenderCores",ImGuiTableColumnFlags_WidthStretch); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("System"); + ImGui::TableNextColumn(); + ImGui::AlignTextToFramePadding(); + ImGui::Text("Playback Core(s)"); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("playback cores are used in real-time, when the program's running"); + } + ImGui::TableNextColumn(); + ImGui::AlignTextToFramePadding(); + ImGui::Text("Render Core(s)"); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("render cores are used for audio exporting"); + } - ImGui::AlignTextToFramePadding(); - ImGui::Text("Genesis/YM2612 core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##YM2612Core",&settings.ym2612Core,ym2612Cores,2); - ImGui::SameLine(); - ImGui::Combo("##YM2612CoreRender",&settings.ym2612CoreRender,ym2612Cores,2); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("Arcade/YM2151"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##ArcadeCore",&settings.arcadeCore,arcadeCores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##ArcadeCoreRender",&settings.arcadeCoreRender,arcadeCores,2); - ImGui::AlignTextToFramePadding(); - ImGui::Text("SN76489 core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##SNCore",&settings.snCore,snCores,2); - ImGui::SameLine(); - ImGui::Combo("##SNCoreRender",&settings.snCoreRender,snCores,2); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("Genesis/YM2612"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##YM2612Core",&settings.ym2612Core,ym2612Cores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##YM2612CoreRender",&settings.ym2612CoreRender,ym2612Cores,2); - ImGui::AlignTextToFramePadding(); - ImGui::Text("NES core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##NESCore",&settings.nesCore,nesCores,2); - ImGui::SameLine(); - ImGui::Combo("##NESCoreRender",&settings.nesCoreRender,nesCores,2); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("SN76489"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##SNCore",&settings.snCore,snCores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##SNCoreRender",&settings.snCoreRender,snCores,2); - ImGui::AlignTextToFramePadding(); - ImGui::Text("FDS core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##FDSCore",&settings.fdsCore,nesCores,2); - ImGui::SameLine(); - ImGui::Combo("##FDSCoreRender",&settings.fdsCoreRender,nesCores,2); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("NES"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##NESCore",&settings.nesCore,nesCores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##NESCoreRender",&settings.nesCoreRender,nesCores,2); - ImGui::AlignTextToFramePadding(); - ImGui::Text("SID core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##C64Core",&settings.c64Core,c64Cores,3); - ImGui::SameLine(); - ImGui::Combo("##C64CoreRender",&settings.c64CoreRender,c64Cores,3); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("FDS"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##FDSCore",&settings.fdsCore,nesCores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##FDSCoreRender",&settings.fdsCoreRender,nesCores,2); - ImGui::AlignTextToFramePadding(); - ImGui::Text("POKEY core"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##POKEYCore",&settings.pokeyCore,pokeyCores,2); - ImGui::SameLine(); - ImGui::Combo("##POKEYCoreRender",&settings.pokeyCoreRender,pokeyCores,2); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("SID"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##C64Core",&settings.c64Core,c64Cores,3); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##C64CoreRender",&settings.c64CoreRender,c64Cores,3); - ImGui::AlignTextToFramePadding(); - ImGui::Text("OPN/OPNA/OPNB cores"); - ImGui::SameLine(); - ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x*0.4f); - ImGui::Combo("##OPNCore",&settings.opnCore,opnCores,2); - ImGui::SameLine(); - ImGui::Combo("##OPNCoreRender",&settings.opnCoreRender,opnCores,2); - ImGui::PopItemWidth(); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("POKEY"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##POKEYCore",&settings.pokeyCore,pokeyCores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##POKEYCoreRender",&settings.pokeyCoreRender,pokeyCores,2); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("OPN/OPNA/OPNB"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##OPNCore",&settings.opnCore,opnCores,2); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::Combo("##OPNCoreRender",&settings.opnCoreRender,opnCores,2); + ImGui::EndTable(); + } ImGui::Separator(); ImGui::AlignTextToFramePadding(); From 3926c4276e11cddb9f3b4c2848f85d24a312819b Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Fri, 18 Aug 2023 12:44:50 +0400 Subject: [PATCH 5/6] oopsie --- src/gui/settings.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 856003853..a1541d461 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -3374,14 +3374,14 @@ void FurnaceGUI::commitSettings() { settings.c64Core!=e->getConfInt("c64Core",0) || settings.pokeyCore!=e->getConfInt("pokeyCore",1) || settings.opnCore!=e->getConfInt("opnCore",1) || - settings.arcadeCoreRender!=e->getConfInt("arcadeCore",0) || - settings.ym2612CoreRender!=e->getConfInt("ym2612Core",0) || - settings.snCoreRender!=e->getConfInt("snCore",0) || - settings.nesCoreRender!=e->getConfInt("nesCore",0) || - settings.fdsCoreRender!=e->getConfInt("fdsCore",0) || - settings.c64CoreRender!=e->getConfInt("c64Core",0) || - settings.pokeyCoreRender!=e->getConfInt("pokeyCore",1) || - settings.opnCoreRender!=e->getConfInt("opnCore",1) + settings.arcadeCoreRender!=e->getConfInt("arcadeCoreRender",0) || + settings.ym2612CoreRender!=e->getConfInt("ym2612CoreRender",0) || + settings.snCoreRender!=e->getConfInt("snCoreRender",0) || + settings.nesCoreRender!=e->getConfInt("nesCoreRender",0) || + settings.fdsCoreRender!=e->getConfInt("fdsCoreRender",0) || + settings.c64CoreRender!=e->getConfInt("c64CoreRender",0) || + settings.pokeyCoreRender!=e->getConfInt("pokeyCoreRender",1) || + settings.opnCoreRender!=e->getConfInt("opnCoreRender",1) ); e->setConf("mainFontSize",settings.mainFontSize); From eab7978556e7a6628943beb7ec1b74b3ff329003 Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Sat, 19 Aug 2023 10:32:36 +0400 Subject: [PATCH 6/6] tablesetcolumnindex -> tablenextcolumn --- src/gui/settings.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index a1541d461..43b3661d9 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1194,7 +1194,7 @@ void FurnaceGUI::drawSettings() { ImGui::TableSetupColumn("##PlaybackCores",ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("##RenderCores",ImGuiTableColumnFlags_WidthStretch); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("System"); ImGui::TableNextColumn(); @@ -1211,7 +1211,7 @@ void FurnaceGUI::drawSettings() { } ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("Arcade/YM2151"); ImGui::TableNextColumn(); @@ -1222,7 +1222,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##ArcadeCoreRender",&settings.arcadeCoreRender,arcadeCores,2); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("Genesis/YM2612"); ImGui::TableNextColumn(); @@ -1233,7 +1233,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##YM2612CoreRender",&settings.ym2612CoreRender,ym2612Cores,2); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("SN76489"); ImGui::TableNextColumn(); @@ -1244,7 +1244,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##SNCoreRender",&settings.snCoreRender,snCores,2); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("NES"); ImGui::TableNextColumn(); @@ -1255,7 +1255,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##NESCoreRender",&settings.nesCoreRender,nesCores,2); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("FDS"); ImGui::TableNextColumn(); @@ -1266,7 +1266,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##FDSCoreRender",&settings.fdsCoreRender,nesCores,2); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("SID"); ImGui::TableNextColumn(); @@ -1277,7 +1277,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##C64CoreRender",&settings.c64CoreRender,c64Cores,3); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("POKEY"); ImGui::TableNextColumn(); @@ -1288,7 +1288,7 @@ void FurnaceGUI::drawSettings() { ImGui::Combo("##POKEYCoreRender",&settings.pokeyCoreRender,pokeyCores,2); ImGui::TableNextRow(); - ImGui::TableSetColumnIndex(0); + ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("OPN/OPNA/OPNB"); ImGui::TableNextColumn();