mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Temporarily remove SDL code from panda-qt
This commit is contained in:
parent
fb0a2a6801
commit
1c50ca065d
2 changed files with 0 additions and 23 deletions
|
@ -1,7 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
|
@ -39,9 +37,6 @@ class MainWindow : public QMainWindow {
|
||||||
QComboBox* themeSelect = nullptr;
|
QComboBox* themeSelect = nullptr;
|
||||||
QMenuBar* menuBar = nullptr;
|
QMenuBar* menuBar = nullptr;
|
||||||
|
|
||||||
SDL_GameController* gameController = nullptr;
|
|
||||||
int gameControllerID;
|
|
||||||
|
|
||||||
Theme currentTheme;
|
Theme currentTheme;
|
||||||
void setTheme(Theme theme);
|
void setTheme(Theme theme);
|
||||||
void swapEmuBuffer();
|
void swapEmuBuffer();
|
||||||
|
|
|
@ -51,24 +51,6 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
|
||||||
usingGL = (rendererType == RendererType::OpenGL || rendererType == RendererType::Software || rendererType == RendererType::Null);
|
usingGL = (rendererType == RendererType::OpenGL || rendererType == RendererType::Software || rendererType == RendererType::Null);
|
||||||
usingVk = (rendererType == RendererType::Vulkan);
|
usingVk = (rendererType == RendererType::Vulkan);
|
||||||
|
|
||||||
if (SDL_Init(SDL_INIT_EVENTS) < 0) {
|
|
||||||
Helpers::panic("Failed to initialize SDL2");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make SDL use consistent positional button mapping
|
|
||||||
SDL_SetHint(SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS, "0");
|
|
||||||
if (SDL_Init(SDL_INIT_GAMECONTROLLER) < 0) {
|
|
||||||
Helpers::warn("Failed to initialize SDL2 GameController: %s", SDL_GetError());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SDL_WasInit(SDL_INIT_GAMECONTROLLER)) {
|
|
||||||
gameController = SDL_GameControllerOpen(0);
|
|
||||||
|
|
||||||
if (gameController != nullptr) {
|
|
||||||
SDL_Joystick* stick = SDL_GameControllerGetJoystick(gameController);
|
|
||||||
gameControllerID = SDL_JoystickInstanceID(stick);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (usingGL) {
|
if (usingGL) {
|
||||||
// Make GL context current for this thread, enable VSync
|
// Make GL context current for this thread, enable VSync
|
||||||
GL::Context* glContext = screen.getGLContext();
|
GL::Context* glContext = screen.getGLContext();
|
||||||
|
|
Loading…
Add table
Reference in a new issue