Rename Emulator::run to FrontendSDL::run (#466)

* Rename Emulator::run to FrontendSDL::run

* Update frontend_sdl.cpp

---------

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
This commit is contained in:
Paris Oplopoios 2024-03-16 23:20:37 +02:00 committed by GitHub
parent a00a5e0f8f
commit 27ad7b01f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 41 additions and 41 deletions

View file

@ -51,22 +51,11 @@ class Emulator {
MiniAudioDevice audioDevice;
Cheats cheats;
// Variables to keep track of whether the user is controlling the 3DS analog stick with their keyboard
// This is done so when a gamepad is connected, we won't automatically override the 3DS analog stick settings with the gamepad's state
// And so the user can still use the keyboard to control the analog
bool keyboardAnalogX = false;
bool keyboardAnalogY = false;
// For tracking whether to update gyroscope
// We bind gyro to right click + mouse movement
bool holdingRightClick = false;
public:
static constexpr u32 width = 400;
static constexpr u32 height = 240 * 2; // * 2 because 2 screens
ROMType romType = ROMType::None;
bool running = false; // Is the emulator running a game?
bool programRunning = false; // Is the emulator program itself running?
private:
#ifdef PANDA3DS_ENABLE_HTTP_SERVER
@ -103,7 +92,6 @@ class Emulator {
void step();
void render();
void reset(ReloadOption reload);
void run(void* frontend = nullptr);
void runFrame();
// Poll the scheduler for events
void pollScheduler();

View file

@ -20,4 +20,15 @@ class FrontendSDL {
SDL_Window* window = nullptr;
SDL_GameController* gameController = nullptr;
int gameControllerID;
bool programRunning = true;
// For tracking whether to update gyroscope
// We bind gyro to right click + mouse movement
bool holdingRightClick = false;
// Variables to keep track of whether the user is controlling the 3DS analog stick with their keyboard
// This is done so when a gamepad is connected, we won't automatically override the 3DS analog stick settings with the gamepad's state
// And so the user can still use the keyboard to control the analog
bool keyboardAnalogX = false;
bool keyboardAnalogY = false;
};