mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
AGS: Engine: prevent invalid parameter in video player
partially from upstream 4efaf8116a2bd0bcf909b174dc28b945e4b52745
This commit is contained in:
parent
43bdb0d5c5
commit
902b92341d
@ -41,6 +41,9 @@ std::chrono::microseconds GetFrameDuration() {
|
||||
}
|
||||
|
||||
int setTimerFps(int new_fps) {
|
||||
assert(new_fps >= 0);
|
||||
if (new_fps <= 0)
|
||||
return _G(framerate);
|
||||
int old_fps = _G(framerate);
|
||||
_G(tick_duration) = std::chrono::microseconds(1000000LL / new_fps);
|
||||
_G(framerate) = new_fps;
|
||||
|
Loading…
x
Reference in New Issue
Block a user