diff --git a/DDrawCompat/D3dDdi/FormatInfo.cpp b/DDrawCompat/D3dDdi/FormatInfo.cpp index f82239a..d48ae64 100644 --- a/DDrawCompat/D3dDdi/FormatInfo.cpp +++ b/DDrawCompat/D3dDdi/FormatInfo.cpp @@ -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); } diff --git a/DDrawCompat/DDraw/RealPrimarySurface.cpp b/DDrawCompat/DDraw/RealPrimarySurface.cpp index 63ab1c2..eb61481 100644 --- a/DDrawCompat/DDraw/RealPrimarySurface.cpp +++ b/DDrawCompat/DDraw/RealPrimarySurface.cpp @@ -215,7 +215,7 @@ namespace CompatPtr getLastSurface() { DDSCAPS2 caps = {}; - caps.dwCaps = DDSCAPS_FLIP;; + caps.dwCaps = DDSCAPS_FLIP; CompatPtr backBuffer(getBackBuffer()); CompatPtr lastSurface; if (backBuffer) diff --git a/DDrawCompat/DDraw/Surfaces/SurfaceImpl.cpp b/DDrawCompat/DDraw/Surfaces/SurfaceImpl.cpp index 7a07b20..bbaa0ea 100644 --- a/DDrawCompat/DDraw/Surfaces/SurfaceImpl.cpp +++ b/DDrawCompat/DDraw/Surfaces/SurfaceImpl.cpp @@ -225,7 +225,7 @@ namespace DDraw template HRESULT SurfaceImpl::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) { diff --git a/DDrawCompat/Gdi/Cursor.cpp b/DDrawCompat/Gdi/Cursor.cpp index c19a748..0e45c9a 100644 --- a/DDrawCompat/Gdi/Cursor.cpp +++ b/DDrawCompat/Gdi/Cursor.cpp @@ -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) diff --git a/DDrawCompat/Gdi/WinProc.cpp b/DDrawCompat/Gdi/WinProc.cpp index b98f0eb..d1c881e 100644 --- a/DDrawCompat/Gdi/WinProc.cpp +++ b/DDrawCompat/Gdi/WinProc.cpp @@ -194,7 +194,7 @@ namespace break; case WM_SETCURSOR: - SetCursor(CALL_ORIG_FUNC(GetCursor)()); + SetCursor(GetCursor()); break; case WM_STYLECHANGED: