From dec7875a6e23212021e4d9080330a42832dfe02a Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 15 Jun 2021 01:40:19 +0000
Subject: [PATCH] update SDL soruce to 2.0.14
---
source/src/video/windows/SDL_windowswindow.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/source/src/video/windows/SDL_windowswindow.c b/source/src/video/windows/SDL_windowswindow.c
index 237d380..61f12ed 100644
--- a/source/src/video/windows/SDL_windowswindow.c
+++ b/source/src/video/windows/SDL_windowswindow.c
@@ -24,7 +24,6 @@
#include "../../core/windows/SDL_windows.h"
-#include "SDL_assert.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
#include "../../events/SDL_keyboard_c.h"
@@ -33,6 +32,7 @@
#include "SDL_windowsvideo.h"
#include "SDL_windowswindow.h"
#include "SDL_hints.h"
+#include "SDL_timer.h"
/* Dropfile support */
#include <shellapi.h>
@@ -187,6 +187,7 @@
data->hinstance = (HINSTANCE) GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
data->created = created;
data->mouse_button_flags = 0;
+ data->last_pointer_update = (LPARAM)-1;
data->videodata = videodata;
data->initializing = SDL_TRUE;
@@ -808,9 +809,8 @@
}
}
-
/*
- * Creates a HelperWindow used for DirectInput events.
+ * Creates a HelperWindow used for DirectInput.
*/
int
SDL_HelperWindowCreate(void)
@@ -915,7 +915,6 @@
return;
}
if (data->skip_update_clipcursor) {
- data->skip_update_clipcursor = SDL_FALSE;
return;
}
if (!GetClipCursor(&clipped_rect)) {
@@ -954,10 +953,20 @@
}
}
}
- } else if (SDL_memcmp(&clipped_rect, &data->cursor_clipped_rect, sizeof(clipped_rect)) == 0) {
- ClipCursor(NULL);
- SDL_zero(data->cursor_clipped_rect);
+ } else {
+ POINT first, second;
+
+ first.x = clipped_rect.left;
+ first.y = clipped_rect.top;
+ second.x = clipped_rect.right - 1;
+ second.y = clipped_rect.bottom - 1;
+ if (PtInRect(&data->cursor_clipped_rect, first) &&
+ PtInRect(&data->cursor_clipped_rect, second)) {
+ ClipCursor(NULL);
+ SDL_zero(data->cursor_clipped_rect);
+ }
}
+ data->last_updated_clipcursor = SDL_GetTicks();
}
int
--
Gitblit v1.9.3