mirror of https://github.com/odrling/Aegisub
Fixed audio display's slowness.
Originally committed to SVN as r2488.
This commit is contained in:
parent
f77a4ccd22
commit
07bc0a91b0
|
@ -104,6 +104,7 @@ AudioDisplay::AudioDisplay(wxWindow *parent)
|
||||||
samples = 0;
|
samples = 0;
|
||||||
hasFocus = (wxWindow::FindFocus() == this);
|
hasFocus = (wxWindow::FindFocus() == this);
|
||||||
needImageUpdate = false;
|
needImageUpdate = false;
|
||||||
|
needImageUpdateWeak = true;
|
||||||
|
|
||||||
// Init
|
// Init
|
||||||
UpdateTimer.SetOwner(this,Audio_Update_Timer);
|
UpdateTimer.SetOwner(this,Audio_Update_Timer);
|
||||||
|
@ -165,7 +166,9 @@ void AudioDisplay::UpdateImage(bool weak) {
|
||||||
|
|
||||||
// Set image as needing to be redrawn
|
// Set image as needing to be redrawn
|
||||||
needImageUpdate = true;
|
needImageUpdate = true;
|
||||||
if (needImageUpdateWeak) needImageUpdateWeak = weak;
|
if (weak == false && needImageUpdateWeak == true) {
|
||||||
|
needImageUpdateWeak = false;
|
||||||
|
}
|
||||||
Refresh(false);
|
Refresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,7 +388,7 @@ void AudioDisplay::DoUpdateImage() {
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
needImageUpdate = false;
|
needImageUpdate = false;
|
||||||
needImageUpdateWeak = false;
|
needImageUpdateWeak = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue