mirror of https://github.com/odrling/Aegisub
Only repaint the video slider on seek if the thumb will actually move
Cuts CPU usage for playback in totally arbitrary circumstances by about 5%.
This commit is contained in:
parent
4bdccb889c
commit
633fa0e4d7
|
@ -67,8 +67,10 @@ VideoSlider::VideoSlider (wxWindow* parent, agi::Context *c)
|
||||||
|
|
||||||
void VideoSlider::SetValue(int value) {
|
void VideoSlider::SetValue(int value) {
|
||||||
if (val == value) return;
|
if (val == value) return;
|
||||||
val = mid(0, value, max);
|
value = mid(0, value, max);
|
||||||
Refresh(false);
|
if (GetXAtValue(val) != GetXAtValue(value))
|
||||||
|
Refresh(false);
|
||||||
|
val = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoSlider::VideoOpened(AsyncVideoProvider *provider) {
|
void VideoSlider::VideoOpened(AsyncVideoProvider *provider) {
|
||||||
|
|
Loading…
Reference in New Issue