mirror of
https://github.com/encounter/SDL.git
synced 2025-07-02 03:13:34 +00:00
Fixed divide by zero if setting integer scale without setting logical width and height
This commit is contained in:
parent
e4af8ce968
commit
8e2634eb13
@ -1145,6 +1145,9 @@ UpdateLogicalSize(SDL_Renderer *renderer)
|
||||
float scale;
|
||||
SDL_Rect viewport;
|
||||
|
||||
if (!renderer->logical_w || !renderer->logical_h) {
|
||||
return 0;
|
||||
}
|
||||
if (SDL_GetRendererOutputSize(renderer, &w, &h) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user