Android: add SetWindowResizable() implementation
- which also enable/disable the orientation lock status. This is only provided when the window is not SDL_WINDOW_FULLSCREEN (see SDL_video.c). Final orientation also depends on SDL_HINT_ORIENTATIONS.main
parent
006aafabcf
commit
f5a980448e
|
@ -122,6 +122,7 @@ Android_CreateDevice(int devindex)
|
||||||
device->SetWindowTitle = Android_SetWindowTitle;
|
device->SetWindowTitle = Android_SetWindowTitle;
|
||||||
device->SetWindowFullscreen = Android_SetWindowFullscreen;
|
device->SetWindowFullscreen = Android_SetWindowFullscreen;
|
||||||
device->MinimizeWindow = Android_MinimizeWindow;
|
device->MinimizeWindow = Android_MinimizeWindow;
|
||||||
|
device->SetWindowResizable = Android_SetWindowResizable;
|
||||||
device->DestroyWindow = Android_DestroyWindow;
|
device->DestroyWindow = Android_DestroyWindow;
|
||||||
device->GetWindowWMInfo = Android_GetWindowWMInfo;
|
device->GetWindowWMInfo = Android_GetWindowWMInfo;
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,12 @@ Android_MinimizeWindow(_THIS, SDL_Window *window)
|
||||||
Android_JNI_MinizeWindow();
|
Android_JNI_MinizeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Android_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable)
|
||||||
|
{
|
||||||
|
/* Set orientation */
|
||||||
|
Android_JNI_SetOrientation(window->w, window->h, window->flags & SDL_WINDOW_RESIZABLE, SDL_GetHint(SDL_HINT_ORIENTATIONS));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Android_DestroyWindow(_THIS, SDL_Window *window)
|
Android_DestroyWindow(_THIS, SDL_Window *window)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@ extern int Android_CreateWindow(_THIS, SDL_Window *window);
|
||||||
extern void Android_SetWindowTitle(_THIS, SDL_Window *window);
|
extern void Android_SetWindowTitle(_THIS, SDL_Window *window);
|
||||||
extern void Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen);
|
extern void Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen);
|
||||||
extern void Android_MinimizeWindow(_THIS, SDL_Window *window);
|
extern void Android_MinimizeWindow(_THIS, SDL_Window *window);
|
||||||
|
extern void Android_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable);
|
||||||
|
|
||||||
extern void Android_DestroyWindow(_THIS, SDL_Window *window);
|
extern void Android_DestroyWindow(_THIS, SDL_Window *window);
|
||||||
extern SDL_bool Android_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info);
|
extern SDL_bool Android_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info);
|
||||||
|
|
Loading…
Reference in New Issue