mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix compilation with OpenGL ES 2
This commit is contained in:
parent
fd60a1caff
commit
44b106528c
|
@ -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 <QApplication>
|
||||
#include <QResizeEvent>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#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"
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ SettingsView::SettingsView(ConfigController* controller, InputController* inputC
|
|||
}
|
||||
|
||||
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 @@ SettingsView::~SettingsView() {
|
|||
}
|
||||
|
||||
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"));
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#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>
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
|
|||
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 @@ void Window::loadConfig() {
|
|||
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::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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue