all repos — mgba @ 44b106528c31b6cd224f1200d67b7643aab23109

mGBA Game Boy Advance Emulator

Qt: Fix compilation with OpenGL ES 2
Cameron Cawley ccawley2011@gmail.com
Mon, 29 Jan 2018 17:24:39 +0000
commit

44b106528c31b6cd224f1200d67b7643aab23109

parent

fd60a1caff2c80ede9c2acda6986dea09abea5f0

M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -5,7 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this

* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "DisplayGL.h" -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) #include <QApplication> #include <QResizeEvent>
M src/platform/qt/DisplayGL.hsrc/platform/qt/DisplayGL.h

@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef QGBA_DISPLAY_GL #define QGBA_DISPLAY_GL -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) #include "Display.h"
M src/platform/qt/SettingsView.cppsrc/platform/qt/SettingsView.cpp

@@ -187,7 +187,7 @@ m_ui.tabs->addItem(tr("Shortcuts"));

} SettingsView::~SettingsView() { -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) if (m_shader) { m_ui.stackedWidget->removeWidget(m_shader); m_shader->setParent(nullptr);

@@ -196,7 +196,7 @@ #endif

} void SettingsView::setShaderSelector(ShaderSelector* shaderSelector) { -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) m_shader = shaderSelector; m_ui.stackedWidget->addWidget(m_shader); m_ui.tabs->addItem(tr("Shaders"));
M src/platform/qt/ShaderSelector.cppsrc/platform/qt/ShaderSelector.cpp

@@ -21,7 +21,7 @@ #include <mgba/core/version.h>

#include <mgba-util/vfs.h> #include "platform/video-backend.h" -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) #if !defined(_WIN32) || defined(USE_EPOXY) #include "platform/opengl/gles2.h"
M src/platform/qt/ShaderSelector.hsrc/platform/qt/ShaderSelector.h

@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef QGBA_SHADER_SELECTOR_H #define QGBA_SHADER_SELECTOR_H -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) #include <QDialog>
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -78,7 +78,7 @@ m_controller->setInputController(&m_inputController);

updateTitle(); m_display = Display::create(this); -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) m_shaderView = new ShaderSelector(m_display, m_config); #endif

@@ -276,7 +276,7 @@ if (opts->fullscreen) {

enterFullScreen(); } -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) if (opts->shader) { struct VDir* shader = VDirOpen(opts->shader); if (shader) {

@@ -463,7 +463,7 @@ }

void Window::openSettingsWindow() { SettingsView* settingsWindow = new SettingsView(m_config, &m_inputController, m_shortcutController); -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) if (m_display->supportsShaders()) { settingsWindow->setShaderSelector(m_shaderView); }