Qt: Fix compilation with OpenGL ES 2
Cameron Cawley ccawley2011@gmail.com
Mon, 29 Jan 2018 17:24:39 +0000
6 files changed,
9 insertions(+),
9 deletions(-)
M
src/platform/qt/DisplayGL.cpp
→
src/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.h
→
src/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.cpp
→
src/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.cpp
→
src/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.h
→
src/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.cpp
→
src/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); }