const int m_w, m_h, m_Bpp;
const float ratio_x, ratio_y;
const int m_w, m_h, m_Bpp;
const float ratio_x, ratio_y;
protected:
HAAScalerBase(SDL_Surface* screen, int w, int h, float r_x, float r_y)
: m_screen(screen), m_w(w), m_h(h),
m_Bpp(m_screen->format->BitsPerPixel / 8),
ratio_x(r_x), ratio_y(r_y)
{
protected:
HAAScalerBase(SDL_Surface* screen, int w, int h, float r_x, float r_y)
: m_screen(screen), m_w(w), m_h(h),
m_Bpp(m_screen->format->BitsPerPixel / 8),
ratio_x(r_x), ratio_y(r_y)
{
centerRectangle(m_area, GUI.Width, GUI.Height, w * r_x, h * r_y);
// Clear the SDL screen with black, just in case it gets drawn.
SDL_FillRect(screen, 0, SDL_MapRGB(screen->format, 0, 0, 0));
centerRectangle(m_area, GUI.Width, GUI.Height, w * r_x, h * r_y);
// Clear the SDL screen with black, just in case it gets drawn.
SDL_FillRect(screen, 0, SDL_MapRGB(screen->format, 0, 0, 0));
actor = HAA_CreateActor(0, m_w, m_h, m_screen->format->BitsPerPixel);
actor = HAA_CreateActor(0, m_w, m_h, m_screen->format->BitsPerPixel);
- HAA_SetPosition(actor, m_area.x, m_area.y + 60);
+ HAA_SetPosition(actor, m_area.x, m_area.y + (fullscreen ? 0 : 60));
+ // In windowed mode, take care of the title bar (xoffset = 60)