Commit 0974df52ec17a4e9341a94009324b55c8cad1f26
1 parent
e4ed3f73
Try both software and accelerated renderer
Showing
1 changed file
with
6 additions
and
1 deletions
primlib.c
@@ -133,7 +133,12 @@ int gfx_init() { | @@ -133,7 +133,12 @@ int gfx_init() { | ||
133 | exit(3); | 133 | exit(3); |
134 | } else { | 134 | } else { |
135 | // Create renderer for window | 135 | // Create renderer for window |
136 | - renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE); | 136 | + renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_SOFTWARE); |
137 | + | ||
138 | + if (renderer == NULL) { | ||
139 | + renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_ACCELERATED); | ||
140 | + } | ||
141 | + | ||
137 | if (renderer == NULL) { | 142 | if (renderer == NULL) { |
138 | printf("Renderer could not be created! SDL Error: %s\n", SDL_GetError()); | 143 | printf("Renderer could not be created! SDL Error: %s\n", SDL_GetError()); |
139 | exit(3); | 144 | exit(3); |