win32: cursor doesn't get stuck when dragged outside window

This commit is contained in:
p989 2009-07-20 16:03:00 +00:00
parent 6d4e256d2b
commit 17fe2472a2
1 changed files with 3 additions and 4 deletions

View File

@ -226,8 +226,6 @@ volatile BOOL paused = TRUE;
volatile BOOL pausedByMinimize = FALSE;
u32 glock = 0;
BOOL click = FALSE;
BOOL finished = FALSE;
BOOL romloaded = FALSE;
@ -2679,6 +2677,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
s32 x = (s32)((s16)LOWORD(lParam));
s32 y = (s32)((s16)HIWORD(lParam));
GetClientRect(hwnd,&r);
SetCapture(hwnd);
int defwidth = video.width, defheight = (video.height+video.screengap);
int winwidth = (r.right-r.left), winheight = (r.bottom-r.top);
@ -2720,8 +2719,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
return 0;
case WM_LBUTTONUP:
if(click)
ReleaseCapture();
ReleaseCapture();
NDS_releaseTouch();
HudClickRelease(&Hud);
return 0;