Initial screen layout implementation

This commit is contained in:
wheremyfoodat 2025-07-04 17:53:36 +03:00
parent d06f600b3a
commit 62748eef47
11 changed files with 335 additions and 126 deletions

View file

@ -4,6 +4,7 @@
#include <filesystem>
#include "PICA/screen_layout.hpp"
#include "emulator.hpp"
#include "input_mappings.hpp"
@ -27,7 +28,11 @@ class FrontendSDL {
u32 windowHeight = 480;
int gameControllerID;
bool programRunning = true;
// Coordinates (x/y/width/height) for the two screens in window space, used for properly handling touchscreen regardless
// of layout or resizing
ScreenLayout::WindowCoordinates screenCoordinates;
// For tracking whether to update gyroscope
// We bind gyro to right click + mouse movement
bool holdingRightClick = false;
@ -38,5 +43,7 @@ class FrontendSDL {
bool keyboardAnalogX = false;
bool keyboardAnalogY = false;
private:
void setupControllerSensors(SDL_GameController* controller);
void handleLeftClick(int mouseX, int mouseY);
};