diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index fab988604..6998e0205 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -4017,7 +4017,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop) { } } if (nextToTouch>=0) { - double waitTime=totalWait+(loopTimer[nextToTouch]*(44100.0/MIN(1,loopFreq[nextToTouch]))); + double waitTime=totalWait+(loopTimer[nextToTouch]*(44100.0/MAX(1,loopFreq[nextToTouch]))); if (waitTime>0) { w->writeC(0x61); w->writeS(waitTime); diff --git a/src/engine/platform/genesis.cpp b/src/engine/platform/genesis.cpp index 945ec60b4..e2d883f82 100644 --- a/src/engine/platform/genesis.cpp +++ b/src/engine/platform/genesis.cpp @@ -385,7 +385,7 @@ void DivPlatformGenesis::tick() { off=8363.0/(double)s->centerRate; } } - dacRate=(1280000*1.25*off)/MIN(1,chan[i].baseFreq); + dacRate=(1280000*1.25*off)/MAX(1,chan[i].baseFreq); if (dacRate<1) dacRate=1; if (dumpWrites) addWrite(0xffff0001,1280000/dacRate); } @@ -515,7 +515,7 @@ int DivPlatformGenesis::dispatch(DivCommand c) { } dacPos=0; dacPeriod=0; - dacRate=1280000/MIN(1,parent->song.sample[dacSample]->rate); + dacRate=1280000/MAX(1,parent->song.sample[dacSample]->rate); if (dumpWrites) addWrite(0xffff0001,parent->song.sample[dacSample]->rate); chan[c.chan].furnaceDac=false; } diff --git a/src/engine/platform/pce.cpp b/src/engine/platform/pce.cpp index 301f85095..87f1af1f1 100644 --- a/src/engine/platform/pce.cpp +++ b/src/engine/platform/pce.cpp @@ -209,7 +209,7 @@ void DivPlatformPCE::tick() { off=8363.0/(double)s->centerRate; } } - chan[i].dacRate=((double)chipClock/2)/MIN(1,off*chan[i].freq); + chan[i].dacRate=((double)chipClock/2)/MAX(1,off*chan[i].freq); if (dumpWrites) addWrite(0xffff0001+(i<<8),chan[i].dacRate); } if (chan[i].freq>4095) chan[i].freq=4095; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index c480bbae1..6d0a55b7d 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3162,6 +3162,9 @@ void FurnaceGUI::drawPattern() { if (ImGui::Selectable(extraChannelButtons?" --##ExtraChannelButtons":" ++##ExtraChannelButtons",false,ImGuiSelectableFlags_NoPadWithHalfSpacing,ImVec2(0.0f,lineHeight+1.0f*dpiScale))) { extraChannelButtons=!extraChannelButtons; } + if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) { + fancyPattern=!fancyPattern; + } for (int i=0; isong.chanShow[i]) continue; ImGui::TableNextColumn(); @@ -3888,7 +3891,7 @@ void FurnaceGUI::drawSettings() { ImGui::Text("Buffer size"); ImGui::SameLine(); - String bs=fmt::sprintf("%d (latency: ~%.1fms)",settings.audioBufSize,2000.0*(double)settings.audioBufSize/(double)MIN(1,settings.audioRate)); + String bs=fmt::sprintf("%d (latency: ~%.1fms)",settings.audioBufSize,2000.0*(double)settings.audioBufSize/(double)MAX(1,settings.audioRate)); if (ImGui::BeginCombo("##BufferSize",bs.c_str())) { BUFFER_SIZE_SELECTABLE(64); BUFFER_SIZE_SELECTABLE(128); @@ -7230,15 +7233,15 @@ void FurnaceGUI::showError(String what) { void FurnaceGUI::processDrags(int dragX, int dragY) { if (macroDragActive) { if (macroDragLen>0) { - int x=((dragX-macroDragStart.x)*macroDragLen/MIN(1,macroDragAreaSize.x)); + int x=((dragX-macroDragStart.x)*macroDragLen/MAX(1,macroDragAreaSize.x)); if (x<0) x=0; if (x>=macroDragLen) x=macroDragLen-1; x+=macroDragScroll; int y; if (macroDragBitMode) { - y=(int)(macroDragMax-((dragY-macroDragStart.y)*(double(macroDragMax-macroDragMin)/(double)MIN(1,macroDragAreaSize.y)))); + y=(int)(macroDragMax-((dragY-macroDragStart.y)*(double(macroDragMax-macroDragMin)/(double)MAX(1,macroDragAreaSize.y)))); } else { - y=round(macroDragMax-((dragY-macroDragStart.y)*(double(macroDragMax-macroDragMin)/(double)MIN(1,macroDragAreaSize.y)))); + y=round(macroDragMax-((dragY-macroDragStart.y)*(double(macroDragMax-macroDragMin)/(double)MAX(1,macroDragAreaSize.y)))); } if (y>macroDragMax) y=macroDragMax; if (y0) { - int x=(dragX-macroLoopDragStart.x)*macroLoopDragLen/MIN(1,macroLoopDragAreaSize.x); + int x=(dragX-macroLoopDragStart.x)*macroLoopDragLen/MAX(1,macroLoopDragAreaSize.x); if (x<0) x=0; if (x>=macroLoopDragLen) x=-1; x+=macroDragScroll; @@ -7260,10 +7263,10 @@ void FurnaceGUI::processDrags(int dragX, int dragY) { } if (waveDragActive) { if (waveDragLen>0) { - int x=(dragX-waveDragStart.x)*waveDragLen/MIN(1,waveDragAreaSize.x); + int x=(dragX-waveDragStart.x)*waveDragLen/MAX(1,waveDragAreaSize.x); if (x<0) x=0; if (x>=waveDragLen) x=waveDragLen-1; - int y=round(waveDragMax-((dragY-waveDragStart.y)*(double(waveDragMax-waveDragMin)/(double)MIN(1,waveDragAreaSize.y)))); + int y=round(waveDragMax-((dragY-waveDragStart.y)*(double(waveDragMax-waveDragMin)/(double)MAX(1,waveDragAreaSize.y)))); if (y>waveDragMax) y=waveDragMax; if (y