diff options
| author | 2018-07-12 18:26:27 +0200 | |
|---|---|---|
| committer | 2018-07-12 09:26:27 -0700 | |
| commit | 316b933a31a22dafccc4884a224b202fa1062fbf (patch) | |
| tree | 67b8166a63090efe643be846e24102721e047ca5 /src | |
| parent | Merge pull request #648 from ogniK5377/no-net (diff) | |
| download | yuzu-316b933a31a22dafccc4884a224b202fa1062fbf.tar.gz yuzu-316b933a31a22dafccc4884a224b202fa1062fbf.tar.xz yuzu-316b933a31a22dafccc4884a224b202fa1062fbf.zip | |
Port #3335 and #3373 from Citra: "Small SDL fixes" and "Print the actual error preventing SDL from working" (#637)
* Port #3335 and #3373 from Citra
* Fixup: Use the new logging placeholders
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index e6f0bbe8f..ec73f08bd 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -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 | LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); | 129 | LOG_CRITICAL(Frontend, "Failed to create SDL2 window! {}", SDL_GetError()); |
| 130 | exit(1); | 130 | exit(1); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| @@ -137,12 +137,12 @@ 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 | LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); | 140 | LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! {}", SDL_GetError()); |
| 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 | LOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); | 145 | LOG_CRITICAL(Frontend, "Failed to initialize GL functions! {}", SDL_GetError()); |
| 146 | exit(1); | 146 | exit(1); |
| 147 | } | 147 | } |
| 148 | 148 | ||
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 5f67ae4ee..f126bd277 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -22,10 +22,8 @@ | |||
| 22 | #include "yuzu_cmd/config.h" | 22 | #include "yuzu_cmd/config.h" |
| 23 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" | 23 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" |
| 24 | 24 | ||
| 25 | #ifdef _MSC_VER | ||
| 26 | #include <getopt.h> | ||
| 27 | #else | ||
| 28 | #include <getopt.h> | 25 | #include <getopt.h> |
| 26 | #ifndef _MSC_VER | ||
| 29 | #include <unistd.h> | 27 | #include <unistd.h> |
| 30 | #endif | 28 | #endif |
| 31 | 29 | ||