mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-12-03 17:42:55 +00:00
ref_soft: if SDL renderer does not support SDL_RENDERER_ACCELERATED, fallback to SDL_RENDERER_SOFTWARE
This commit is contained in:
parent
0babeb62c1
commit
ccc9027b1a
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue