Qt: Fix compilation with OpenGL ES 2
Cameron Cawley ccawley2011@gmail.com
Mon, 29 Jan 2018 17:24:39 +0000
7 files changed,
10 insertions(+),
10 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 "CoreController.h"
M
src/platform/qt/DisplayGL.h
→
src/platform/qt/DisplayGL.h
@@ -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/. */ #pragma once -#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
@@ -289,13 +289,13 @@ m_ui.tabs->addItem(tr("Shortcuts"));
} SettingsView::~SettingsView() { -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) setShaderSelector(nullptr); #endif } void SettingsView::setShaderSelector(ShaderSelector* shaderSelector) { -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) if (m_shader) { auto items = m_ui.tabs->findItems(tr("Shaders"), Qt::MatchFixedString); for (const auto& item : items) {
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
@@ -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/. */ #pragma once -#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
@@ -400,7 +400,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.get()); }@@ -795,7 +795,7 @@ m_display->stopDrawing();
detachWidget(m_display.get()); } m_display = std::move(std::unique_ptr<Display>(Display::create(this))); -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) m_shaderView.reset(); m_shaderView = std::make_unique<ShaderSelector>(m_display.get(), m_config); #endif@@ -814,7 +814,7 @@
const mCoreOptions* opts = m_config->options(); m_display->lockAspectRatio(opts->lockAspectRatio); m_display->filter(opts->resampleVideo); -#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 && m_display->supportsShaders()) {
M
src/platform/qt/Window.h
→
src/platform/qt/Window.h
@@ -191,7 +191,7 @@ QMenu* m_mruMenu = nullptr;
QMenu* m_videoLayers; QMenu* m_audioChannels; ShortcutController* m_shortcutController; -#if defined(BUILD_GL) || defined(BUILD_GLES) +#if defined(BUILD_GL) || defined(BUILD_GLES2) std::unique_ptr<ShaderSelector> m_shaderView; #endif bool m_fullscreenOnStart = false;