Configurable keyboard mappings

This commit is contained in:
offtkp 2024-03-16 02:54:56 +02:00
parent 27ad7b01f3
commit e576e64736
9 changed files with 162 additions and 125 deletions

View file

@ -5,9 +5,11 @@
#include <filesystem>
#include "emulator.hpp"
#include "mappings.hpp"
class FrontendSDL {
Emulator emu;
InputMappings keyboardMappings;
#ifdef PANDA3DS_ENABLE_OPENGL
SDL_GLContext glContext;
#endif
@ -16,6 +18,7 @@ class FrontendSDL {
FrontendSDL();
bool loadROM(const std::filesystem::path& path);
void run();
u32 getMapping(InputMappings::Scancode scancode) { return keyboardMappings.getMapping(scancode); }
SDL_Window* window = nullptr;
SDL_GameController* gameController = nullptr;