AppleWin/source/frontends/sdl/imgui/sdlimguiframe.h
Andrea Odetti 0b3e57d934 Rewrite the way full speed works.
This is more and more similar to AppleWin's logic.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2021-06-07 18:34:17 +01:00

50 lines
998 B
C++

#pragma once
#include "frontends/sdl/sdlframe.h"
#include "frontends/sdl/imgui/sdlsettings.h"
#include "frontends/sdl/imgui/gles.h"
namespace common2
{
struct EmulatorOptions;
}
namespace sa2
{
class SDLImGuiFrame : public SDLFrame
{
public:
SDLImGuiFrame(const common2::EmulatorOptions & options);
~SDLImGuiFrame() override;
void VideoPresentScreen() override;
void ResetSpeed() override;
protected:
void ProcessSingleEvent(const SDL_Event & event, bool & quit) override;
void GetRelativeMousePosition(const SDL_MouseMotionEvent & motion, double & x, double & y) const override;
private:
void UpdateTexture();
void ClearBackground();
void DrawAppleVideo();
size_t myPitch;
size_t myOffset;
size_t myBorderlessWidth;
size_t myBorderlessHeight;
int myDeadTopZone; // for mouse position
SDL_GLContext myGLContext;
ImTextureID myTexture;
std::string myIniFileLocation;
ImGuiSettings mySettings;
};
}