AppleWin/source/frontends/sa2/emulator.h
mariofutire@gmail.com 1400828452 Use keycode as opposed to scancode.
We honour a layout change decided by the user.

Signed-off-by: mariofutire@gmail.com <pi@raspberrypi>
2020-10-11 20:14:02 +01:00

29 lines
639 B
C++

#pragma once
#include <SDL.h>
#include <memory>
class Emulator
{
public:
Emulator(
const std::shared_ptr<SDL_Window> & window,
const std::shared_ptr<SDL_Renderer> & renderer,
const std::shared_ptr<SDL_Texture> & texture
);
void executeOneFrame();
void processEvents(bool & quit);
private:
void processKeyDown(const SDL_KeyboardEvent & e, bool & quit);
void processKeyUp(const SDL_KeyboardEvent & e);
const std::shared_ptr<SDL_Window> myWindow;
const std::shared_ptr<SDL_Renderer> myRenderer;
const std::shared_ptr<SDL_Texture> myTexture;
const int myFPS;
int myMultiplier;
bool myFullscreen;
};