From 3dd655733234f5235f6745045651fb968513601f Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Fri, 21 Apr 2023 18:08:12 +0900 Subject: [PATCH] sdl: Exit if SDL fails to create software renderer (#6430) --- src/citra/emu_window/emu_window_sdl2_sw.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/citra/emu_window/emu_window_sdl2_sw.cpp b/src/citra/emu_window/emu_window_sdl2_sw.cpp index c4ac3b9c3..1d4f3d43d 100644 --- a/src/citra/emu_window/emu_window_sdl2_sw.cpp +++ b/src/citra/emu_window/emu_window_sdl2_sw.cpp @@ -37,6 +37,11 @@ EmuWindow_SDL2_SW::EmuWindow_SDL2_SW(bool fullscreen, bool is_secondary) window_surface = SDL_GetWindowSurface(render_window); renderer = SDL_CreateSoftwareRenderer(window_surface); + if (renderer == nullptr) { + LOG_CRITICAL(Frontend, "Failed to create SDL2 software renderer: {}", SDL_GetError()); + exit(1); + } + if (fullscreen) { Fullscreen(); }