summaryrefslogtreecommitdiff
path: root/Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-01-31 18:38:35 +0800
committerchai <chaifix@163.com>2019-01-31 18:38:35 +0800
commit2ec55fd974a63b705a4777c256d2222c874fa043 (patch)
tree48f1fea59ee9fc713a28a9aac3f05b98dc5ae66f /Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c
parentc581dfbf1e849f393861d15e82aa6446c0c1c310 (diff)
*SDL project
Diffstat (limited to 'Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c')
-rw-r--r--Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c b/Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c
index 8d45b72..358ab23 100644
--- a/Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c
+++ b/Source/3rdParty/SDL2/src/video/windows/SDL_windowsvideo.c
@@ -63,6 +63,15 @@ UpdateWindowFrameUsableWhileCursorHidden(void *userdata, const char *name, const
}
}
+static void WIN_SuspendScreenSaver(_THIS)
+{
+ if (_this->suspend_screensaver) {
+ SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
+ } else {
+ SetThreadExecutionState(ES_CONTINUOUS);
+ }
+}
+
/* Windows driver bootstrap functions */
@@ -136,6 +145,7 @@ WIN_CreateDevice(int devindex)
device->GetDisplayModes = WIN_GetDisplayModes;
device->SetDisplayMode = WIN_SetDisplayMode;
device->PumpEvents = WIN_PumpEvents;
+ device->SuspendScreenSaver = WIN_SuspendScreenSaver;
device->CreateSDLWindow = WIN_CreateWindow;
device->CreateSDLWindowFrom = WIN_CreateWindowFrom;
@@ -164,6 +174,7 @@ WIN_CreateDevice(int devindex)
device->DestroyWindowFramebuffer = WIN_DestroyWindowFramebuffer;
device->OnWindowEnter = WIN_OnWindowEnter;
device->SetWindowHitTest = WIN_SetWindowHitTest;
+ device->AcceptDragAndDrop = WIN_AcceptDragAndDrop;
device->shape_driver.CreateShaper = Win32_CreateShaper;
device->shape_driver.SetWindowShape = Win32_SetWindowShape;