GUI: prevent lag when drawing on wave editor

This commit is contained in:
tildearrow 2023-07-15 02:50:49 -05:00
parent d096d5eb3c
commit 99e55136f3
2 changed files with 8 additions and 2 deletions

View File

@ -2419,7 +2419,7 @@ void FurnaceGUI::processDrags(int dragX, int dragY) {
if (y>waveDragMax) y=waveDragMax;
if (y<waveDragMin) y=waveDragMin;
waveDragTarget[x]=y;
e->notifyWaveChange(curWave);
notifyWaveChange=true;
MARK_MODIFIED;
}
}
@ -3746,6 +3746,11 @@ bool FurnaceGUI::loop() {
midiLock.unlock();
}
if (notifyWaveChange) {
notifyWaveChange=false;
e->notifyWaveChange(curWave);
}
eventTimeEnd=SDL_GetPerformanceCounter();
if (SDL_GetWindowFlags(sdlWin)&SDL_WINDOW_MINIMIZED) {
@ -6718,6 +6723,7 @@ FurnaceGUI::FurnaceGUI():
preserveChanPos(false),
wantScrollList(false),
noteInputPoly(true),
notifyWaveChange(false),
displayPendingIns(false),
pendingInsSingle(false),
displayPendingRawSample(false),

View File

@ -1310,7 +1310,7 @@ class FurnaceGUI {
bool vgmExportDirectStream, displayInsTypeList;
bool portrait, injectBackUp, mobileMenuOpen, warnColorPushed;
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
bool displayNew, fullScreen, preserveChanPos, wantScrollList, noteInputPoly;
bool displayNew, fullScreen, preserveChanPos, wantScrollList, noteInputPoly, notifyWaveChange;
bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString;
bool mobileEdit;
bool killGraphics;