1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

fix mouse_lock bug

This commit is contained in:
FunkyFr3sh 2018-03-11 11:43:43 +01:00
parent c141dc478f
commit b579a258f8
2 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
1 VERSIONINFO
FILEVERSION 1,1,5,0
PRODUCTVERSION 1,1,5,0
FILEVERSION 1,1,5,1
PRODUCTVERSION 1,1,5,1
{
BLOCK "StringFileInfo"
{
@ -8,13 +8,13 @@ PRODUCTVERSION 1,1,5,0
{
VALUE "CompanyName", "cncnet.org"
VALUE "FileDescription", "DirectDraw replacement for C&C95 and Red Alert"
VALUE "FileVersion", "1.1.5.0"
VALUE "FileVersion", "1.1.5.1"
VALUE "InternalName", "ddraw"
VALUE "LegalCopyright", "Copyright (c) 2010-2018"
VALUE "LegalTrademarks", ""
VALUE "OriginalFileName", "ddraw.dll"
VALUE "ProductName", "DirectDraw replacement for C&C95 and Red Alert"
VALUE "ProductVersion", "1.1.5.0"
VALUE "ProductVersion", "1.1.5.1"
VALUE "Comments", "https://cncnet.org"
}
}

View File

@ -389,13 +389,13 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
{
SetWindowPos(This->hWnd, HWND_TOPMOST, 0, 0, This->render.width, This->render.height, SWP_SHOWWINDOW);
mouse_lock();
if(!This->devmode && ChangeDisplaySettings(&This->render.mode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
{
This->render.run = FALSE;
return DDERR_INVALIDMODE;
}
mouse_lock();
}
if(This->render.thread == NULL)
@ -522,14 +522,14 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_ACTIVATE:
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE)
{
if (wParam == WA_ACTIVE)
{
mouse_lock();
}
if (!ddraw->windowed)
{
ChangeDisplaySettings(&ddraw->render.mode, CDS_FULLSCREEN);
}
if (wParam == WA_ACTIVE)
{
mouse_lock();
}
}
else if (wParam == WA_INACTIVE)
{