1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00
VVVVVV/desktop_version/src/Screen.h
Ethan Lee 0f450f3e39 Move the VSync work to Screen.
The problem we're running into is entirely contained in the Screen - we need to
either decouple graphics context init from Screen::init or we need to take out
the screenbuffer interaction from loadstats (which I'm more in favor of since we
can just pull the config values and pass them to Screen::init later).
2020-07-02 00:19:40 -04:00

40 lines
675 B
C++

#ifndef SCREEN_H
#define SCREEN_H
#include <SDL.h>
class Screen
{
public:
void init();
void ResizeScreen(int x, int y);
void ResizeToNearestMultiple();
void GetWindowSize(int* x, int* y);
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
void FlipScreen();
const SDL_PixelFormat* GetFormat();
void toggleFullScreen();
void toggleStretchMode();
void toggleLinearFilter();
void resetRendererWorkaround();
bool isWindowed;
bool isFiltered;
bool badSignalEffect;
int stretchMode;
bool vsync;
SDL_Window *m_window;
SDL_Renderer *m_renderer;
SDL_Texture *m_screenTexture;
SDL_Surface* m_screen;
SDL_Rect filterSubrect;
};
#endif /* SCREEN_H */