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

Method CalculateWindowSize

Source/Window.cpp:283–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void cWindow::CalculateWindowSize() {
284 SDL_DisplayMode current;
285 SDL_GetCurrentDisplayMode(0, &current);
286
287 while ((mOriginalResolution.mWidth * mScaler) <= (unsigned int) (current.w / 2) &&
288 (mOriginalResolution.mHeight * mScaler) <= (unsigned int) (current.h / 2) ) {
289 ++mScaler;
290 }
291
292 SetWindowSize( mScaler );
293}
294
295int16 cWindow::CalculateFullscreenSize() {
296 SDL_DisplayMode current;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected