mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion/sumulator] Add fallback to software rendering
Some Linux platforms like Linux containers on Chrome OS do not offer hardware-accelerated rendering.
This commit is contained in:
committed by
Ecco
parent
f7c555d593
commit
eecf1c3c49
@@ -77,7 +77,13 @@ void init() {
|
||||
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
|
||||
|
||||
// Try creating a hardware-accelerated renderer.
|
||||
sRenderer = SDL_CreateRenderer(sWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
if (!sRenderer) {
|
||||
// Try creating a software renderer.
|
||||
sRenderer = SDL_CreateRenderer(sWindow, -1, 0);
|
||||
}
|
||||
assert(sRenderer);
|
||||
|
||||
Display::init(sRenderer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user