summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd/emu_window/emu_window_sdl2.cpp')
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index cfd8eb7e6..e6f0bbe8f 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -62,19 +62,19 @@ void EmuWindow_SDL2::Fullscreen() {
62 return; 62 return;
63 } 63 }
64 64
65 NGLOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); 65 LOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError());
66 66
67 // Try a different fullscreening method 67 // Try a different fullscreening method
68 NGLOG_INFO(Frontend, "Attempting to use borderless fullscreen..."); 68 LOG_INFO(Frontend, "Attempting to use borderless fullscreen...");
69 if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) { 69 if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) {
70 return; 70 return;
71 } 71 }
72 72
73 NGLOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError()); 73 LOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError());
74 74
75 // Fallback algorithm: Maximise window. 75 // Fallback algorithm: Maximise window.
76 // Works on all systems (unless something is seriously wrong), so no fallback for this one. 76 // Works on all systems (unless something is seriously wrong), so no fallback for this one.
77 NGLOG_INFO(Frontend, "Falling back on a maximised window..."); 77 LOG_INFO(Frontend, "Falling back on a maximised window...");
78 SDL_MaximizeWindow(render_window); 78 SDL_MaximizeWindow(render_window);
79} 79}
80 80
@@ -91,7 +91,7 @@ bool EmuWindow_SDL2::SupportsRequiredGLExtensions() {
91 unsupported_ext.push_back("ARB_vertex_attrib_binding"); 91 unsupported_ext.push_back("ARB_vertex_attrib_binding");
92 92
93 for (const std::string& ext : unsupported_ext) 93 for (const std::string& ext : unsupported_ext)
94 NGLOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext); 94 LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext);
95 95
96 return unsupported_ext.empty(); 96 return unsupported_ext.empty();
97} 97}
@@ -103,7 +103,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
103 103
104 // Initialize the window 104 // Initialize the window
105 if (SDL_Init(SDL_INIT_VIDEO) < 0) { 105 if (SDL_Init(SDL_INIT_VIDEO) < 0) {
106 NGLOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); 106 LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting...");
107 exit(1); 107 exit(1);
108 } 108 }
109 109
@@ -126,7 +126,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
126 SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); 126 SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
127 127
128 if (render_window == nullptr) { 128 if (render_window == nullptr) {
129 NGLOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); 129 LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting...");
130 exit(1); 130 exit(1);
131 } 131 }
132 132
@@ -137,17 +137,17 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
137 gl_context = SDL_GL_CreateContext(render_window); 137 gl_context = SDL_GL_CreateContext(render_window);
138 138
139 if (gl_context == nullptr) { 139 if (gl_context == nullptr) {
140 NGLOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); 140 LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting...");
141 exit(1); 141 exit(1);
142 } 142 }
143 143
144 if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { 144 if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) {
145 NGLOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); 145 LOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting...");
146 exit(1); 146 exit(1);
147 } 147 }
148 148
149 if (!SupportsRequiredGLExtensions()) { 149 if (!SupportsRequiredGLExtensions()) {
150 NGLOG_CRITICAL(Frontend, "GPU does not support all required OpenGL extensions! Exiting..."); 150 LOG_CRITICAL(Frontend, "GPU does not support all required OpenGL extensions! Exiting...");
151 exit(1); 151 exit(1);
152 } 152 }
153 153