video_setmode(): do nothing if the current mode matches the desired one
In particular, this eliminates an annoying flicker/window recreation after exiting the video options menu without changing the resolution.
This commit is contained in:
parent
9f96fb7204
commit
c46b87718e
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ static void _video_setmode(int w, int h, int fs, int fallback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void video_setmode(int w, int h, int fs) {
|
void video_setmode(int w, int h, int fs) {
|
||||||
|
if(w == video.current.width && h == video.current.height && fs == video_isfullscreen())
|
||||||
|
return;
|
||||||
|
|
||||||
_video_setmode(w, h, fs, False);
|
_video_setmode(w, h, fs, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue