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:
parent
8e4741ab70
commit
ac1eccd79f
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -194,7 +194,7 @@ namespace
|
||||
break;
|
||||
|
||||
case WM_SETCURSOR:
|
||||
SetCursor(CALL_ORIG_FUNC(GetCursor)());
|
||||
SetCursor(GetCursor());
|
||||
break;
|
||||
|
||||
case WM_STYLECHANGED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user