Skip to content

Commit

Permalink
ref_soft: if SDL renderer does not support SDL_RENDERER_ACCELERATED, …
Browse files Browse the repository at this point in the history
…fallback to SDL_RENDERER_SOFTWARE
  • Loading branch information
john-tornblom committed Nov 16, 2024
1 parent 0babeb6 commit ccc9027
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/client/refresh/soft/sw_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,10 @@ RE_InitContext(void *win)
SDL_SetRenderVSync(renderer, 1);
#else
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
if(!renderer)
{
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE | SDL_RENDERER_PRESENTVSYNC);
}
#endif
}
else
Expand All @@ -1922,6 +1926,10 @@ RE_InitContext(void *win)
renderer = SDL_CreateRenderer(window, NULL);
#else
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
if(!renderer)
{
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE);
}
#endif
}

Expand Down

0 comments on commit ccc9027

Please sign in to comment.