Skip to content

Commit

Permalink
Try a few types of renderer creation requests, just in case.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 18, 2019
1 parent 2e01b47 commit 1375588
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/SDL12_compat.c
Expand Up @@ -1876,11 +1876,17 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags12)
/* always use a renderer for non-OpenGL windows. */
SDL_RendererInfo rinfo;
SDL_assert(!VideoGLContext20); /* either a new window or we destroyed all this */
if (!VideoRenderer20) {
VideoRenderer20 = SDL20_CreateRenderer(VideoWindow20, -1, SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC);
}
if (!VideoRenderer20) {
VideoRenderer20 = SDL20_CreateRenderer(VideoWindow20, -1, SDL_RENDERER_PRESENTVSYNC);
}
if (!VideoRenderer20) {
VideoRenderer20 = SDL20_CreateRenderer(VideoWindow20, -1, 0);
if (!VideoRenderer20) {
return EndVidModeCreate();
}
}
if (!VideoRenderer20) {
return EndVidModeCreate();
}

SDL20_RenderSetLogicalSize(VideoRenderer20, width, height);
Expand Down

0 comments on commit 1375588

Please sign in to comment.