VIDEO: Check whether SDL_WINDOW_RESIZABLE is present.
SDL versions older than 2.0.5 doesn't have this symbol or the SDL_SetWindowResizable function.
This commit is contained in:
parent
021413a2d7
commit
783ee136d7
1 changed files with 2 additions and 0 deletions
|
@ -1812,10 +1812,12 @@ if (!vptr->vid_texture) {
|
||||||
|
|
||||||
vptr->vid_format = SDL_AllocFormat (SDL_PIXELFORMAT_ARGB8888);
|
vptr->vid_format = SDL_AllocFormat (SDL_PIXELFORMAT_ARGB8888);
|
||||||
|
|
||||||
|
#ifdef SDL_WINDOW_RESIZABLE
|
||||||
if (vptr->vid_flags & SIM_VID_RESIZABLE) {
|
if (vptr->vid_flags & SIM_VID_RESIZABLE) {
|
||||||
SDL_SetWindowResizable(vptr->vid_window, SDL_TRUE);
|
SDL_SetWindowResizable(vptr->vid_window, SDL_TRUE);
|
||||||
SDL_RenderSetIntegerScale(vptr->vid_renderer, SDL_TRUE);
|
SDL_RenderSetIntegerScale(vptr->vid_renderer, SDL_TRUE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SDL_StopTextInput ();
|
SDL_StopTextInput ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue