mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-29 07:53:01 +00:00
GUI: make multi-threading options visible
This commit is contained in:
parent
18a3a34427
commit
394a2b5442
3 changed files with 25 additions and 40 deletions
|
@ -498,10 +498,6 @@ void FurnaceGUI::drawExport() {
|
|||
e->song.linearPitch=1;
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
if (ImGui::Button(_("Enable multi-threading settings"))) {
|
||||
settings.showPool=1;
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
if (ImGui::Button(_("Set fat to max"))) {
|
||||
ImGuiStyle& sty=ImGui::GetStyle();
|
||||
sty.FramePadding=ImVec2(20.0f*dpiScale,20.0f*dpiScale);
|
||||
|
|
|
@ -1916,7 +1916,6 @@ class FurnaceGUI {
|
|||
int wasapiEx;
|
||||
int chanOscThreads;
|
||||
int renderPoolThreads;
|
||||
int showPool;
|
||||
int writeInsNames;
|
||||
int readInsNames;
|
||||
int fontBackend;
|
||||
|
@ -2172,7 +2171,6 @@ class FurnaceGUI {
|
|||
wasapiEx(0),
|
||||
chanOscThreads(0),
|
||||
renderPoolThreads(0),
|
||||
showPool(0),
|
||||
writeInsNames(0),
|
||||
readInsNames(1),
|
||||
fontBackend(1),
|
||||
|
|
|
@ -1403,38 +1403,36 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
if (settings.showPool) {
|
||||
bool renderPoolThreadsB=(settings.renderPoolThreads>0);
|
||||
if (ImGui::Checkbox(_("Multi-threaded (EXPERIMENTAL)"),&renderPoolThreadsB)) {
|
||||
if (renderPoolThreadsB) {
|
||||
settings.renderPoolThreads=2;
|
||||
} else {
|
||||
settings.renderPoolThreads=0;
|
||||
}
|
||||
bool renderPoolThreadsB=(settings.renderPoolThreads>0);
|
||||
if (ImGui::Checkbox(_("Multi-threaded (EXPERIMENTAL)"),&renderPoolThreadsB)) {
|
||||
if (renderPoolThreadsB) {
|
||||
settings.renderPoolThreads=2;
|
||||
} else {
|
||||
settings.renderPoolThreads=0;
|
||||
}
|
||||
settingsChanged=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("runs chip emulation on separate threads.\nmay increase performance when using heavy emulation cores.\n\nwarnings:\n- experimental!\n- only useful on multi-chip songs."));
|
||||
}
|
||||
|
||||
if (renderPoolThreadsB) {
|
||||
pushWarningColor(settings.renderPoolThreads>cpuCores,settings.renderPoolThreads>cpuCores);
|
||||
if (ImGui::InputInt(_("Number of threads"),&settings.renderPoolThreads)) {
|
||||
if (settings.renderPoolThreads<2) settings.renderPoolThreads=2;
|
||||
if (settings.renderPoolThreads>32) settings.renderPoolThreads=32;
|
||||
settingsChanged=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("runs chip emulation on separate threads.\nmay increase performance when using heavy emulation cores.\n\nwarnings:\n- experimental!\n- only useful on multi-chip songs."));
|
||||
}
|
||||
|
||||
if (renderPoolThreadsB) {
|
||||
pushWarningColor(settings.renderPoolThreads>cpuCores,settings.renderPoolThreads>cpuCores);
|
||||
if (ImGui::InputInt(_("Number of threads"),&settings.renderPoolThreads)) {
|
||||
if (settings.renderPoolThreads<2) settings.renderPoolThreads=2;
|
||||
if (settings.renderPoolThreads>32) settings.renderPoolThreads=32;
|
||||
settingsChanged=true;
|
||||
if (settings.renderPoolThreads>=DIV_MAX_CHIPS) {
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("that's the limit!"));
|
||||
}
|
||||
if (settings.renderPoolThreads>=DIV_MAX_CHIPS) {
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("that's the limit!"));
|
||||
}
|
||||
} else if (settings.renderPoolThreads>cpuCores) {
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("it is a VERY bad idea to set this number higher than your CPU core count (%d)!"),cpuCores);
|
||||
}
|
||||
} else if (settings.renderPoolThreads>cpuCores) {
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("it is a VERY bad idea to set this number higher than your CPU core count (%d)!"),cpuCores);
|
||||
}
|
||||
popWarningColor();
|
||||
}
|
||||
popWarningColor();
|
||||
}
|
||||
|
||||
bool lowLatencyB=settings.lowLatency;
|
||||
|
@ -4565,10 +4563,6 @@ void FurnaceGUI::drawSettings() {
|
|||
mmlString[30]=_("OK, if I bring your Partial pitch linearity will you stop bothering me?");
|
||||
settings.displayPartial=1;
|
||||
}
|
||||
if (checker==0x8537719f && checker1==0x17a1f34) {
|
||||
mmlString[30]=_("unlocked audio multi-threading options!");
|
||||
settings.showPool=1;
|
||||
}
|
||||
if (checker==0x94222d83 && checker1==0x6600) {
|
||||
mmlString[30]=_("enabled \"comfortable\" mode");
|
||||
ImGuiStyle& sty=ImGui::GetStyle();
|
||||
|
@ -4689,7 +4683,6 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.chanOscThreads=conf.getInt("chanOscThreads",0);
|
||||
settings.renderPoolThreads=conf.getInt("renderPoolThreads",0);
|
||||
settings.shaderOsc=conf.getInt("shaderOsc",0);
|
||||
settings.showPool=conf.getInt("showPool",0);
|
||||
settings.writeInsNames=conf.getInt("writeInsNames",0);
|
||||
settings.readInsNames=conf.getInt("readInsNames",1);
|
||||
settings.defaultAuthorName=conf.getString("defaultAuthorName","");
|
||||
|
@ -5203,7 +5196,6 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.wasapiEx,0,1);
|
||||
clampSetting(settings.chanOscThreads,0,256);
|
||||
clampSetting(settings.renderPoolThreads,0,DIV_MAX_CHIPS);
|
||||
clampSetting(settings.showPool,0,1);
|
||||
clampSetting(settings.writeInsNames,0,1);
|
||||
clampSetting(settings.readInsNames,0,1);
|
||||
clampSetting(settings.fontBackend,0,1);
|
||||
|
@ -5273,7 +5265,6 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("chanOscThreads",settings.chanOscThreads);
|
||||
conf.set("renderPoolThreads",settings.renderPoolThreads);
|
||||
conf.set("shaderOsc",settings.shaderOsc);
|
||||
conf.set("showPool",settings.showPool);
|
||||
conf.set("writeInsNames",settings.writeInsNames);
|
||||
conf.set("readInsNames",settings.readInsNames);
|
||||
conf.set("defaultAuthorName",settings.defaultAuthorName);
|
||||
|
|
Loading…
Reference in a new issue