mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-09-30 10:17:23 +02:00
55163e90d5
Another step to fix the bug #556 is to allow Game::savestats() to accept a pointer to an existing ScreenSettings struct. This entails refactoring Game::savesettings() and Game::serializesettings() to accept the function as well, along with adding Screen::GetSettings() so the settings of the current Screen can be easily grabbed.
45 lines
799 B
C++
45 lines
799 B
C++
#ifndef SCREEN_H
|
|
#define SCREEN_H
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "ScreenSettings.h"
|
|
|
|
class Screen
|
|
{
|
|
public:
|
|
void init(const ScreenSettings& settings);
|
|
|
|
void GetSettings(ScreenSettings* settings);
|
|
|
|
void LoadIcon();
|
|
|
|
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 */
|