mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-06-29 07:58:30 +02:00
0f450f3e39
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).
40 lines
675 B
C++
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 */
|