mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-11 22:08:14 +00:00
fixed uninitialized warnings from gcc7, gcc8, and gcc9.
This commit is contained in:
@@ -2123,7 +2123,7 @@ static int UpdateLogicalPresentation(SDL_Renderer *renderer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (renderer->logical_target) {
|
if (renderer->logical_target) {
|
||||||
int existing_w, existing_h;
|
int existing_w = 0, existing_h = 0;
|
||||||
|
|
||||||
if (SDL_QueryTexture(renderer->logical_target, NULL, NULL, &existing_w, &existing_h) < 0) {
|
if (SDL_QueryTexture(renderer->logical_target, NULL, NULL, &existing_w, &existing_h) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
@@ -2240,7 +2240,7 @@ int SDL_SetRenderLogicalPresentation(SDL_Renderer *renderer, int w, int h, SDL_R
|
|||||||
}
|
}
|
||||||
} else if (mode != SDL_LOGICAL_PRESENTATION_MATCH) {
|
} else if (mode != SDL_LOGICAL_PRESENTATION_MATCH) {
|
||||||
if (renderer->logical_target) {
|
if (renderer->logical_target) {
|
||||||
int existing_w, existing_h;
|
int existing_w = 0, existing_h = 0;
|
||||||
|
|
||||||
if (SDL_QueryTexture(renderer->logical_target, NULL, NULL, &existing_w, &existing_h) < 0) {
|
if (SDL_QueryTexture(renderer->logical_target, NULL, NULL, &existing_w, &existing_h) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
|
Reference in New Issue
Block a user