1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02:00
VVVVVV/desktop_version/src/Screen.h
Misa 6ba7058a0e Fix VSync renderer workaround
SDL just got an API to toggle VSync without having to tear down the
renderer ( libsdl-org/SDL#4157 ). We can remove the workaround and use
that instead. For now, we are putting it behind an ifdef until SDL
2.0.18 officially releases in November.

Fixes #831.
2021-09-14 20:23:22 -07:00

47 lines
921 B
C++

#ifndef SCREEN_H
#define SCREEN_H
#include <SDL.h>
#include "ScreenSettings.h"
class Screen
{
public:
void init(const ScreenSettings& settings);
void destroy(void);
void GetSettings(ScreenSettings* settings);
void LoadIcon(void);
void ResizeScreen(int x, int y);
void ResizeToNearestMultiple(void);
void GetWindowSize(int* x, int* y);
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
void FlipScreen(bool flipmode);
const SDL_PixelFormat* GetFormat(void);
void toggleFullScreen(void);
void toggleStretchMode(void);
void toggleLinearFilter(void);
void toggleVSync(void);
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 */