Fixed building with C89 compiler
parent
4ddf85b1d5
commit
c87b0142fe
|
@ -116,6 +116,8 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display
|
||||||
SDL_LockMutex(Android_ActivityMutex);
|
SDL_LockMutex(Android_ActivityMutex);
|
||||||
|
|
||||||
if (window == Android_Window) {
|
if (window == Android_Window) {
|
||||||
|
SDL_WindowData *data;
|
||||||
|
int old_w, old_h, new_w, new_h;
|
||||||
|
|
||||||
/* If the window is being destroyed don't change visible state */
|
/* If the window is being destroyed don't change visible state */
|
||||||
if (!window->is_destroying) {
|
if (!window->is_destroying) {
|
||||||
|
@ -132,8 +134,7 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display
|
||||||
goto endfunction;
|
goto endfunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
data = (SDL_WindowData *)window->driverdata;
|
||||||
|
|
||||||
if (!data || !data->native_window) {
|
if (!data || !data->native_window) {
|
||||||
if (data && !data->native_window) {
|
if (data && !data->native_window) {
|
||||||
SDL_SetError("Missing native window");
|
SDL_SetError("Missing native window");
|
||||||
|
@ -141,11 +142,11 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display
|
||||||
goto endfunction;
|
goto endfunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
int old_w = window->w;
|
old_w = window->w;
|
||||||
int old_h = window->h;
|
old_h = window->h;
|
||||||
|
|
||||||
int new_w = ANativeWindow_getWidth(data->native_window);
|
new_w = ANativeWindow_getWidth(data->native_window);
|
||||||
int new_h = ANativeWindow_getHeight(data->native_window);
|
new_h = ANativeWindow_getHeight(data->native_window);
|
||||||
|
|
||||||
if (new_w < 0 || new_h < 0) {
|
if (new_w < 0 || new_h < 0) {
|
||||||
SDL_SetError("ANativeWindow_getWidth/Height() fails");
|
SDL_SetError("ANativeWindow_getWidth/Height() fails");
|
||||||
|
|
Loading…
Reference in New Issue