fixed incorrect LPARAM type casts in the WM_MOVE handler (the coordinates are signed)

This commit is contained in:
myT 2019-02-19 18:51:44 +01:00
parent 7a83c0d6c4
commit 51809f8276

View file

@ -262,8 +262,8 @@ LRESULT CALLBACK MainWndProc (
AdjustWindowRect( &r, GetWindowLong( hWnd, GWL_STYLE ), FALSE );
const RECT& monRect = g_wv.monitorRects[g_wv.monitor];
const int x = LOWORD( lParam );
const int y = HIWORD( lParam );
const int x = (int)(short)LOWORD( lParam );
const int y = (int)(short)HIWORD( lParam );
Cvar_SetValue( "vid_xpos", x + r.left - monRect.left );
Cvar_SetValue( "vid_ypos", y + r.top - monRect.top );
vid_xpos->modified = qfalse;