From ec2da4eb01f989d059197a488941b15586ed1c8c Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Thu, 21 Mar 2024 00:48:01 +0200 Subject: [PATCH] Fix naming convention --- include/input_mappings.hpp | 3 +-- src/panda_qt/main_window.cpp | 2 +- src/panda_qt/mappings.cpp | 2 +- src/panda_sdl/frontend_sdl.cpp | 2 +- src/panda_sdl/mappings.cpp | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/input_mappings.hpp b/include/input_mappings.hpp index 2c24bffe..177f1d51 100644 --- a/include/input_mappings.hpp +++ b/include/input_mappings.hpp @@ -15,8 +15,7 @@ struct InputMappings { } void setMapping(Scancode scancode, u32 key) { container[scancode] = key; } - - static InputMappings DefaultKeyboardMappings(); + static InputMappings defaultKeyboardMappings(); private: Container container; diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index 02fed376..17f9ff26 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -10,7 +10,7 @@ #include "cheats.hpp" #include "input_mappings.hpp" -MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent), keyboardMappings(InputMappings::DefaultKeyboardMappings()), screen(this) { +MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent), keyboardMappings(InputMappings::defaultKeyboardMappings()), screen(this) { setWindowTitle("Alber"); // Enable drop events for loading ROMs setAcceptDrops(true); diff --git a/src/panda_qt/mappings.cpp b/src/panda_qt/mappings.cpp index bfb453d7..22741a73 100644 --- a/src/panda_qt/mappings.cpp +++ b/src/panda_qt/mappings.cpp @@ -2,7 +2,7 @@ #include -InputMappings InputMappings::DefaultKeyboardMappings() { +InputMappings InputMappings::defaultKeyboardMappings() { InputMappings mappings; mappings.setMapping(Qt::Key_L, HID::Keys::A); mappings.setMapping(Qt::Key_K, HID::Keys::B); diff --git a/src/panda_sdl/frontend_sdl.cpp b/src/panda_sdl/frontend_sdl.cpp index 9ecdd6c2..f94f98f4 100644 --- a/src/panda_sdl/frontend_sdl.cpp +++ b/src/panda_sdl/frontend_sdl.cpp @@ -2,7 +2,7 @@ #include -FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::DefaultKeyboardMappings()) { +FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::defaultKeyboardMappings()) { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS) < 0) { Helpers::panic("Failed to initialize SDL2"); } diff --git a/src/panda_sdl/mappings.cpp b/src/panda_sdl/mappings.cpp index eba76b09..0c09b852 100644 --- a/src/panda_sdl/mappings.cpp +++ b/src/panda_sdl/mappings.cpp @@ -2,7 +2,7 @@ #include -InputMappings InputMappings::DefaultKeyboardMappings() { +InputMappings InputMappings::defaultKeyboardMappings() { InputMappings mappings; mappings.setMapping(SDLK_l, HID::Keys::A); mappings.setMapping(SDLK_k, HID::Keys::B);