Qt: Fix compilation with OpenGL ES 2

This commit is contained in:
Cameron Cawley 2018-01-29 17:24:39 +00:00 committed by endrift
parent 82f78ba37e
commit f039234055
7 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,7 @@
* 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"

View File

@ -5,7 +5,7 @@
* 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"

View File

@ -289,13 +289,13 @@ SettingsView::SettingsView(ConfigController* controller, InputController* inputC
}
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) {

View File

@ -21,7 +21,7 @@
#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"

View File

@ -5,7 +5,7 @@
* 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>

View File

@ -400,7 +400,7 @@ void Window::exportSharkport() {
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 @@ void Window::reloadDisplayDriver() {
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 @@ void Window::reloadDisplayDriver() {
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()) {

View File

@ -191,7 +191,7 @@ private:
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;