/** Size of the (scaled) rendering area, relative to window. */
unsigned short RenderX, RenderY, RenderW, RenderH;
/** Scaling ratio */
- unsigned short Scale;
+ float ScaleX, ScaleY;
} GUI;
void S9xVideoToggleFullscreen();
void S9xVideoOutputFocus(bool hasFocus);
virtual void getRenderedGUIArea(unsigned short & x, unsigned short & y,
unsigned short & w, unsigned short & h)
const = 0;
- virtual int getRatio() const = 0;
+ virtual void getRatio(float & x, float & y) const = 0;
virtual void prepare() = 0;
virtual void finish() = 0;
virtual void pause() = 0;
}
// Take care of scaling
- mouse.x /= GUI.Scale;
- mouse.y /= GUI.Scale;
+ mouse.x /= GUI.ScaleX;
+ mouse.y /= GUI.ScaleY;
if (pressed > 0)
mouse.pressed = true;
GFX.PPLx2 = GFX.Pitch;
scaler->getRenderedGUIArea(GUI.RenderX, GUI.RenderY, GUI.RenderW, GUI.RenderH);
- GUI.Scale = scaler->getRatio();
+ scaler->getRatio(GUI.ScaleX, GUI.ScaleY);
printf("Video: %dx%d (%dx%d output), %hu bits per pixel, %s, %s\n",
gameWidth, gameHeight,
x = m_area.x; y = m_area.y; w = m_area.w; h = m_area.h;
};
- virtual int getRatio() const
+ virtual void getRatio(float & x, float & y) const
{
- return 1;
+ x = 1.0f; y = 1.0f;
};
virtual void prepare() { };
x = m_area.x; y = m_area.y; w = m_area.w; h = m_area.h;
};
- int getRatio() const
+ void getRatio(float & x, float & y) const
{
- return 2;
+ x = 2.0f; y = 2.0f;
};
void prepare() { };
x = m_area.x; y = m_area.y; w = m_area.w; h = m_area.h;
};
- int getRatio() const
+ void getRatio(float & x, float & y) const
{
- return 2;
+ x = 2.0f; y = 2.0f;
};
void prepare() { };
x = m_area.x; y = m_area.y; w = m_area.w; h = m_area.h;
};
- virtual int getRatio() const
+ virtual void getRatio(float & x, float & y) const
{
- return ratio_y; // TODO
+ x = ratio_x; y = ratio_y;
};
virtual void prepare()
x = m_area.x; y = m_area.y; w = m_area.w; h = m_area.h;
};
- int getRatio() const
+ void getRatio(float & x, float & y) const
{
- return 2;
+ x = 2.0f; y = 2.0f;
};
void prepare()