mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Factor out screen settings to ScreenSettings struct
It's a bit annoying to pass each screen setting individually, would be nice if we could just wrap it up in a nice struct and pass that instead.
This commit is contained in:
@@ -17,23 +17,27 @@ extern "C"
|
||||
);
|
||||
}
|
||||
|
||||
void Screen::init(
|
||||
int windowWidth,
|
||||
int windowHeight,
|
||||
bool fullscreen,
|
||||
bool useVsync,
|
||||
int stretch,
|
||||
bool linearFilter,
|
||||
bool badSignal
|
||||
) {
|
||||
ScreenSettings::ScreenSettings()
|
||||
{
|
||||
windowWidth = 320;
|
||||
windowHeight = 240;
|
||||
fullscreen = false;
|
||||
useVsync = false;
|
||||
stretch = 0;
|
||||
linearFilter = false;
|
||||
badSignal = false;
|
||||
}
|
||||
|
||||
void Screen::init(const ScreenSettings& settings)
|
||||
{
|
||||
m_window = NULL;
|
||||
m_renderer = NULL;
|
||||
m_screenTexture = NULL;
|
||||
m_screen = NULL;
|
||||
isWindowed = !fullscreen;
|
||||
stretchMode = stretch;
|
||||
isFiltered = linearFilter;
|
||||
vsync = useVsync;
|
||||
isWindowed = !settings.fullscreen;
|
||||
stretchMode = settings.stretch;
|
||||
isFiltered = settings.linearFilter;
|
||||
vsync = settings.useVsync;
|
||||
filterSubrect.x = 1;
|
||||
filterSubrect.y = 1;
|
||||
filterSubrect.w = 318;
|
||||
@@ -84,9 +88,9 @@ void Screen::init(
|
||||
240
|
||||
);
|
||||
|
||||
badSignalEffect = badSignal;
|
||||
badSignalEffect = settings.badSignal;
|
||||
|
||||
ResizeScreen(windowWidth, windowHeight);
|
||||
ResizeScreen(settings.windowWidth, settings.windowHeight);
|
||||
}
|
||||
|
||||
void Screen::LoadIcon()
|
||||
|
||||
Reference in New Issue
Block a user