MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_RenderSetLogicalSize

Function SDL_RenderSetLogicalSize

deps/SDL2/src/render/SDL_render.c:2047–2065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2045}
2046
2047int
2048SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h)
2049{
2050 CHECK_RENDERER_MAGIC(renderer, -1);
2051
2052 if (!w || !h) {
2053 /* Clear any previous logical resolution */
2054 renderer->logical_w = 0;
2055 renderer->logical_h = 0;
2056 SDL_RenderSetViewport(renderer, NULL);
2057 SDL_RenderSetScale(renderer, 1.0f, 1.0f);
2058 return 0;
2059 }
2060
2061 renderer->logical_w = w;
2062 renderer->logical_h = h;
2063
2064 return UpdateLogicalSize(renderer);
2065}
2066
2067void
2068SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h)

Callers 9

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
WatchGameControllerFunction · 0.85
WatchJoystickFunction · 0.85
SDLTest_CommonInitFunction · 0.85

Calls 2

SDL_RenderSetViewportFunction · 0.85
UpdateLogicalSizeFunction · 0.85

Tested by 3

WatchGameControllerFunction · 0.68
WatchJoystickFunction · 0.68
SDLTest_CommonInitFunction · 0.68