From 1c50ca065dab533e19b1261c7a8d8ed887b6f163 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Fri, 20 Oct 2023 01:04:53 +0300 Subject: [PATCH] Temporarily remove SDL code from panda-qt --- include/panda_qt/main_window.hpp | 5 ----- src/panda_qt/main_window.cpp | 18 ------------------ 2 files changed, 23 deletions(-) diff --git a/include/panda_qt/main_window.hpp b/include/panda_qt/main_window.hpp index 21ad4fa3..b5b93d56 100644 --- a/include/panda_qt/main_window.hpp +++ b/include/panda_qt/main_window.hpp @@ -1,7 +1,5 @@ #pragma once -#include - #include #include #include @@ -39,9 +37,6 @@ class MainWindow : public QMainWindow { QComboBox* themeSelect = nullptr; QMenuBar* menuBar = nullptr; - SDL_GameController* gameController = nullptr; - int gameControllerID; - Theme currentTheme; void setTheme(Theme theme); void swapEmuBuffer(); diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index 20f5c9be..2c2cc64f 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -51,24 +51,6 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) usingGL = (rendererType == RendererType::OpenGL || rendererType == RendererType::Software || rendererType == RendererType::Null); 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) { // Make GL context current for this thread, enable VSync GL::Context* glContext = screen.getGLContext();