1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Fixed invisible cursor when changing to native resolution in Red Alert 2

This commit is contained in:
narzoul 2022-11-12 19:18:02 +01:00
parent 8e4741ab70
commit ac1eccd79f
5 changed files with 6 additions and 5 deletions

View File

@ -200,7 +200,7 @@ namespace D3dDdi
if (info.bitsPerPixel > info.alpha.bitCount)
{
pf.dwFlags = DDPF_RGB;
pf.dwRBitMask = getMask(info.red);;
pf.dwRBitMask = getMask(info.red);
pf.dwGBitMask = getMask(info.green);
pf.dwBBitMask = getMask(info.blue);
}

View File

@ -215,7 +215,7 @@ namespace
CompatPtr<IDirectDrawSurface7> getLastSurface()
{
DDSCAPS2 caps = {};
caps.dwCaps = DDSCAPS_FLIP;;
caps.dwCaps = DDSCAPS_FLIP;
CompatPtr<IDirectDrawSurface7> backBuffer(getBackBuffer());
CompatPtr<IDirectDrawSurface7> lastSurface;
if (backBuffer)

View File

@ -225,7 +225,7 @@ namespace DDraw
template <typename TSurface>
HRESULT SurfaceImpl<TSurface>::QueryInterface(TSurface* This, REFIID riid, LPVOID* obp)
{
auto& iid = Direct3d::replaceDevice(riid);;
auto& iid = Direct3d::replaceDevice(riid);
HRESULT result = getOrigVtable(This).QueryInterface(This, iid, obp);
if (DDERR_INVALIDOBJECT == result)
{

View File

@ -54,7 +54,8 @@ namespace
{
LOG_FUNC("GetCursor");
Compat::ScopedCriticalSection lock(g_cs);
return LOG_RESULT(g_cursor != INVALID_CURSOR ? g_cursor : CALL_ORIG_FUNC(GetCursor)());
auto cursor = CALL_ORIG_FUNC(GetCursor)();
return LOG_RESULT(cursor == g_nullCursor ? g_cursor : cursor);
}
BOOL WINAPI getCursorInfo(PCURSORINFO pci)

View File

@ -194,7 +194,7 @@ namespace
break;
case WM_SETCURSOR:
SetCursor(CALL_ORIG_FUNC(GetCursor)());
SetCursor(GetCursor());
break;
case WM_STYLECHANGED: