diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-03-19 02:31:01 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-05-06 04:10:14 +0200 |
commit | aa4d4ff23c92340baa1771a7d7308d1d91d3b655 (patch) | |
tree | dad47959f5af525e0ddce44847a6e31fae510358 /src/citra | |
parent | Merge pull request #1762 from bunnei/global (diff) | |
download | yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.gz yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.bz2 yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.lz yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.xz yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.zst yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.zip |
Diffstat (limited to '')
-rw-r--r-- | src/citra/emu_window/emu_window_sdl2.cpp | 7 | ||||
-rw-r--r-- | src/citra_qt/main.cpp | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index 924189f4c..12cdd9d95 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -9,6 +9,8 @@ #define SDL_MAIN_HANDLED #include <SDL.h> +#include <glad/glad.h> + #include "common/key_map.h" #include "common/logging/log.h" #include "common/scm_rev.h" @@ -98,6 +100,11 @@ EmuWindow_SDL2::EmuWindow_SDL2() { exit(1); } + if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { + LOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); + exit(1); + } + OnResize(); OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); SDL_PumpEvents(); diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index f1ab29755..a85c94a4b 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -6,6 +6,9 @@ #include <memory> #include <thread> +#include <glad/glad.h> + +#define QT_NO_OPENGL #include <QDesktopWidget> #include <QtGui> #include <QFileDialog> @@ -240,6 +243,14 @@ bool GMainWindow::InitializeSystem() { if (emu_thread != nullptr) ShutdownGame(); + render_window->MakeCurrent(); + if (!gladLoadGL()) { + QMessageBox::critical(this, tr("Error while starting Citra!"), + tr("Failed to initialize the video core!\n\n" + "Please ensure that your GPU supports OpenGL 3.3 and that you have the latest graphics driver.")); + return false; + } + // Initialize the core emulation System::Result system_result = System::Init(render_window); if (System::Result::Success != system_result) { |