sdl: Exit if SDL fails to create software renderer (#6430)
This commit is contained in:
parent
26d6f9d1c6
commit
3dd6557332
|
@ -37,6 +37,11 @@ EmuWindow_SDL2_SW::EmuWindow_SDL2_SW(bool fullscreen, bool is_secondary)
|
||||||
window_surface = SDL_GetWindowSurface(render_window);
|
window_surface = SDL_GetWindowSurface(render_window);
|
||||||
renderer = SDL_CreateSoftwareRenderer(window_surface);
|
renderer = SDL_CreateSoftwareRenderer(window_surface);
|
||||||
|
|
||||||
|
if (renderer == nullptr) {
|
||||||
|
LOG_CRITICAL(Frontend, "Failed to create SDL2 software renderer: {}", SDL_GetError());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
Fullscreen();
|
Fullscreen();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue