mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 08:27:05 +00:00
Android: add MinimizeWindow function (Bug 4580, 4657)
shouldMinimizeOnFocusLoss is un-activated (return false)
This commit is contained in:
@@ -2664,6 +2664,15 @@ ShouldMinimizeOnFocusLoss(SDL_Window * window)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
{
|
||||
extern SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss(void);
|
||||
if (! Android_JNI_ShouldMinimizeOnFocusLoss()) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return SDL_GetHintBoolean(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, SDL_TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ Android_CreateDevice(int devindex)
|
||||
device->CreateSDLWindow = Android_CreateWindow;
|
||||
device->SetWindowTitle = Android_SetWindowTitle;
|
||||
device->SetWindowFullscreen = Android_SetWindowFullscreen;
|
||||
device->MinimizeWindow = Android_MinimizeWindow;
|
||||
device->DestroyWindow = Android_DestroyWindow;
|
||||
device->GetWindowWMInfo = Android_GetWindowWMInfo;
|
||||
|
||||
|
||||
@@ -160,6 +160,12 @@ endfunction:
|
||||
SDL_UnlockMutex(Android_ActivityMutex);
|
||||
}
|
||||
|
||||
void
|
||||
Android_MinimizeWindow(_THIS, SDL_Window *window)
|
||||
{
|
||||
Android_JNI_MinizeWindow();
|
||||
}
|
||||
|
||||
void
|
||||
Android_DestroyWindow(_THIS, SDL_Window *window)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
extern int Android_CreateWindow(_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_MinimizeWindow(_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_Window *Android_Window;
|
||||
|
||||
Reference in New Issue
Block a user