[I'm happy to split one or all of these out into separate PRs if some are more controversial than others.]
This is a bunch of changes related to various FIXMEs in the sdl12-compat code, as noted in #143. This change includes:
glRenderbufferStorate() is a part of core GL 3, so get rid of the fixme reminding us to check.
SDL_VIDEO_FULLSCREEN_DISPLAY was only partly supported, complete it.
Make the timing of presentations in UpdateRects and when handling YUV overlays refresh-rate dependent.
Add a very basic SDL_EnableKeyRepeat() implementation which ignores the delay/interval and just uses SDL2's repeat field.
(Largely in order from least to most controversial.) The only real issues I can imagine are:
The GetEnvironmentWindowPosition() function now sets x and y unconditionally, so intialising them to SDL_WINDOWPOS_UNDEFINED in SDL_SetVideoMode() is now useless.
GetDesiredMillisecondsPerFrame() could be more accurate in windowed-mode if the window is dragged between different screens.
GetDesiredMillisecondsPerFrame() has (obviously) millisecond resolution, so will not be able to accurately represent, e.g, 60Hz displays. (But it's better than the hardcoded 15).
SDL_EnableKeyRepeat() doesn't support the delay/interval parameters properly. Even when key repeats are disabled, we still get KEYDOWN events via the SDL2 TEXTINPUT events (though this existed prior to this change).
[I'm happy to split one or all of these out into separate PRs if some are more controversial than others.]
This is a bunch of changes related to various FIXMEs in the sdl12-compat code, as noted in #143. This change includes:
glRenderbufferStorate()
is a part of core GL 3, so get rid of the fixme reminding us to check.SDL_VIDEO_FULLSCREEN_DISPLAY
was only partly supported, complete it.SDL_EnableKeyRepeat()
implementation which ignores the delay/interval and just uses SDL2's repeat field.(Largely in order from least to most controversial.) The only real issues I can imagine are:
GetEnvironmentWindowPosition()
function now sets x and y unconditionally, so intialising them toSDL_WINDOWPOS_UNDEFINED
inSDL_SetVideoMode()
is now useless.GetDesiredMillisecondsPerFrame()
could be more accurate in windowed-mode if the window is dragged between different screens.GetDesiredMillisecondsPerFrame()
has (obviously) millisecond resolution, so will not be able to accurately represent, e.g, 60Hz displays. (But it's better than the hardcoded 15).SDL_EnableKeyRepeat()
doesn't support thedelay
/interval
parameters properly. Even when key repeats are disabled, we still get KEYDOWN events via the SDL2 TEXTINPUT events (though this existed prior to this change).