mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 06:25:16 +00:00
GUI: fix crash when using MinMod in init pres conf
This commit is contained in:
parent
809ba42ca6
commit
e0c575042e
1 changed files with 11 additions and 7 deletions
|
@ -453,13 +453,17 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
||||||
if (sampRate>65536) sampRate=65536;
|
if (sampRate>65536) sampRate=65536;
|
||||||
altered=true;
|
altered=true;
|
||||||
} rightClickable
|
} rightClickable
|
||||||
DivPlatformGBAMinMod* dispatch=(DivPlatformGBAMinMod*)e->getDispatch(chan);
|
if (chan>=0) {
|
||||||
float maxCPU=dispatch->maxCPU*100;
|
DivPlatformGBAMinMod* dispatch=(DivPlatformGBAMinMod*)e->getDispatch(chan);
|
||||||
ImGui::Text("Actual sample rate: %d Hz", dispatch->chipClock);
|
if (dispatch!=NULL) {
|
||||||
if (maxCPU>90) ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_WARNING]);
|
float maxCPU=dispatch->maxCPU*100;
|
||||||
ImGui::Text("Max mixer CPU usage: %.0f%%", maxCPU);
|
ImGui::Text("Actual sample rate: %d Hz", dispatch->chipClock);
|
||||||
if (maxCPU>90) ImGui::PopStyleColor();
|
if (maxCPU>90) ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_WARNING]);
|
||||||
FurnaceGUI::popWarningColor();
|
ImGui::Text("Max mixer CPU usage: %.0f%%",maxCPU);
|
||||||
|
if (maxCPU>90) ImGui::PopStyleColor();
|
||||||
|
FurnaceGUI::popWarningColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (altered) {
|
if (altered) {
|
||||||
e->lockSave([&]() {
|
e->lockSave([&]() {
|
||||||
flags.set("volScale",volScale);
|
flags.set("volScale",volScale);
|
||||||
|
|
Loading…
Reference in a new issue