AppleWin/source/frontends/sa2/emulator.h
Andrea Odetti f13816262d Clean up multithreading code and offer it via command line options.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2020-11-13 11:51:20 +00:00

34 lines
808 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 executeCycles(const int cycles);
void refreshVideo();
SDL_Rect updateTexture();
void refreshVideo(const SDL_Rect & rect);
void processEvents(bool & quit);
private:
void processKeyDown(const SDL_KeyboardEvent & key, bool & quit);
void processKeyUp(const SDL_KeyboardEvent & key);
void processText(const SDL_TextInputEvent & text);
const std::shared_ptr<SDL_Window> myWindow;
const std::shared_ptr<SDL_Renderer> myRenderer;
const std::shared_ptr<SDL_Texture> myTexture;
int myMultiplier;
bool myFullscreen;
int myExtraCycles;
};