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

Function SDL_GetScaleMode

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

Source from the content-addressed store, hash-verified

1025
1026
1027static SDL_ScaleMode SDL_GetScaleMode(void)
1028{
1029 const char *hint = SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY);
1030
1031 if (!hint || SDL_strcasecmp(hint, "nearest") == 0) {
1032 return SDL_ScaleModeNearest;
1033 } else if (SDL_strcasecmp(hint, "linear") == 0) {
1034 return SDL_ScaleModeLinear;
1035 } else if (SDL_strcasecmp(hint, "best") == 0) {
1036 return SDL_ScaleModeBest;
1037 } else {
1038 return (SDL_ScaleMode)SDL_atoi(hint);
1039 }
1040}
1041
1042SDL_Texture *
1043SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int h)

Callers 1

SDL_CreateTextureFunction · 0.85

Calls 3

SDL_GetHintFunction · 0.85
SDL_strcasecmpFunction · 0.85
SDL_atoiFunction · 0.85

Tested by

no test coverage detected