mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
use real GetCursorPos
This commit is contained in:
parent
1bbb2e62b7
commit
a85a7533e3
8
ddraw.rc
8
ddraw.rc
@ -1,6 +1,6 @@
|
|||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 1,1,4,1
|
FILEVERSION 1,1,4,2
|
||||||
PRODUCTVERSION 1,1,4,1
|
PRODUCTVERSION 1,1,4,2
|
||||||
{
|
{
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
{
|
{
|
||||||
@ -8,13 +8,13 @@ PRODUCTVERSION 1,1,4,1
|
|||||||
{
|
{
|
||||||
VALUE "CompanyName", "cncnet.org"
|
VALUE "CompanyName", "cncnet.org"
|
||||||
VALUE "FileDescription", "DirectDraw replacement for C&C95 and Red Alert"
|
VALUE "FileDescription", "DirectDraw replacement for C&C95 and Red Alert"
|
||||||
VALUE "FileVersion", "1.1.4.1"
|
VALUE "FileVersion", "1.1.4.2"
|
||||||
VALUE "InternalName", "ddraw"
|
VALUE "InternalName", "ddraw"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2010-2017"
|
VALUE "LegalCopyright", "Copyright (c) 2010-2017"
|
||||||
VALUE "LegalTrademarks", ""
|
VALUE "LegalTrademarks", ""
|
||||||
VALUE "OriginalFileName", "ddraw.dll"
|
VALUE "OriginalFileName", "ddraw.dll"
|
||||||
VALUE "ProductName", "DirectDraw replacement for C&C95 and Red Alert"
|
VALUE "ProductName", "DirectDraw replacement for C&C95 and Red Alert"
|
||||||
VALUE "ProductVersion", "1.1.4.1"
|
VALUE "ProductVersion", "1.1.4.2"
|
||||||
VALUE "Comments", "https://cncnet.org"
|
VALUE "Comments", "https://cncnet.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -602,12 +602,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ddraw->cursor.x = GET_X_LPARAM(lParam);
|
|
||||||
ddraw->cursor.y = GET_Y_LPARAM(lParam);
|
|
||||||
|
|
||||||
if (ddraw->devmode)
|
if (ddraw->devmode)
|
||||||
{
|
{
|
||||||
mouse_lock();
|
mouse_lock();
|
||||||
|
ddraw->cursor.x = GET_X_LPARAM(lParam);
|
||||||
|
ddraw->cursor.y = GET_Y_LPARAM(lParam);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
11
src/mouse.c
11
src/mouse.c
@ -37,6 +37,17 @@ BOOL WINAPI fake_GetCursorPos(LPPOINT lpPoint)
|
|||||||
{
|
{
|
||||||
if (lpPoint)
|
if (lpPoint)
|
||||||
{
|
{
|
||||||
|
POINT pt;
|
||||||
|
|
||||||
|
if (!GetCursorPos(&pt))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if(ddraw->locked && (!ddraw->windowed || ScreenToClient(ddraw->hWnd, &pt)))
|
||||||
|
{
|
||||||
|
ddraw->cursor.x = pt.x;
|
||||||
|
ddraw->cursor.y = pt.y;
|
||||||
|
}
|
||||||
|
|
||||||
lpPoint->x = (int)ddraw->cursor.x;
|
lpPoint->x = (int)ddraw->cursor.x;
|
||||||
lpPoint->y = (int)ddraw->cursor.y;
|
lpPoint->y = (int)ddraw->cursor.y;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user