MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / CalculateFullscreenSize

Method CalculateFullscreenSize

Source/Window.cpp:295–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295int16 cWindow::CalculateFullscreenSize() {
296 SDL_DisplayMode current;
297 SDL_GetCurrentDisplayMode(0, &current);
298 int16 Multiplier = 1;
299
300 while ((mOriginalResolution.mWidth * Multiplier) <= (unsigned int) current.w && (mOriginalResolution.mHeight * Multiplier) <= (unsigned int) current.h ) {
301 ++Multiplier;
302 }
303
304 return --Multiplier;
305}
306
307bool cWindow::CanChangeToMultiplier( const int pNewMultiplier ) {
308 SDL_DisplayMode current;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected