2021-02-06 10:02:58 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "frontends/sdl/sdlframe.h"
|
|
|
|
|
2021-02-25 16:04:50 +00:00
|
|
|
namespace common2
|
|
|
|
{
|
2021-05-29 21:50:33 +01:00
|
|
|
struct EmulatorOptions;
|
2021-02-25 16:04:50 +00:00
|
|
|
}
|
2021-02-06 10:02:58 +00:00
|
|
|
|
2021-02-25 16:31:24 +00:00
|
|
|
namespace sa2
|
2021-02-06 10:02:58 +00:00
|
|
|
{
|
|
|
|
|
2021-02-25 16:31:24 +00:00
|
|
|
class SDLRendererFrame : public SDLFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SDLRendererFrame(const common2::EmulatorOptions & options);
|
2021-02-06 10:02:58 +00:00
|
|
|
|
2021-02-25 16:31:24 +00:00
|
|
|
void UpdateTexture() override;
|
|
|
|
void RenderPresent() override;
|
2021-02-06 10:02:58 +00:00
|
|
|
|
2021-06-05 13:51:07 +01:00
|
|
|
protected:
|
|
|
|
void GetRelativeMousePosition(const SDL_MouseMotionEvent & motion, double & x, double & y) const override;
|
|
|
|
|
2021-02-25 16:31:24 +00:00
|
|
|
private:
|
|
|
|
SDL_Rect myRect;
|
|
|
|
int myPitch;
|
|
|
|
|
|
|
|
std::shared_ptr<SDL_Renderer> myRenderer;
|
|
|
|
std::shared_ptr<SDL_Texture> myTexture;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|