From e4b67be7ec3e448c5e88875d7c10c6b043e65025 Mon Sep 17 00:00:00 2001 From: narzoul Date: Sun, 1 May 2016 19:59:53 +0200 Subject: [PATCH] Fixed misleading error messages --- DDrawCompat/CompatDirectDrawSurface.cpp | 4 ++++ DDrawCompat/DDrawRepository.cpp | 6 +----- DDrawCompat/RealPrimarySurface.cpp | 6 +----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/DDrawCompat/CompatDirectDrawSurface.cpp b/DDrawCompat/CompatDirectDrawSurface.cpp index 03c0e92..0bc36a5 100644 --- a/DDrawCompat/CompatDirectDrawSurface.cpp +++ b/DDrawCompat/CompatDirectDrawSurface.cpp @@ -288,6 +288,10 @@ HRESULT STDMETHODCALLTYPE CompatDirectDrawSurface::Blt( (lpDDBltFx->dwDDFX & (DDBLTFX_MIRRORLEFTRIGHT | DDBLTFX_MIRRORUPDOWN))) { mirroredSrcSurface = getMirroredSurface(*lpDDSrcSurface, lpSrcRect, lpDDBltFx->dwDDFX); + if (!mirroredSrcSurface) + { + LOG_ONCE("Failed to emulate a mirrored Blt"); + } } if (mirroredSrcSurface) diff --git a/DDrawCompat/DDrawRepository.cpp b/DDrawCompat/DDrawRepository.cpp index 35626a1..01434c6 100644 --- a/DDrawCompat/DDrawRepository.cpp +++ b/DDrawCompat/DDrawRepository.cpp @@ -62,12 +62,8 @@ namespace surface.desc.ddpfPixelFormat = pf; surface.desc.ddsCaps.dwCaps = caps; - HRESULT result = CompatDirectDraw::s_origVtable.CreateSurface( + CompatDirectDraw::s_origVtable.CreateSurface( dd, &surface.desc, &surface.surface, nullptr); - if (FAILED(result)) - { - LOG_ONCE("Failed to create a repository surface: " << result); - } return surface; } diff --git a/DDrawCompat/RealPrimarySurface.cpp b/DDrawCompat/RealPrimarySurface.cpp index 76fb586..9cb8a28 100644 --- a/DDrawCompat/RealPrimarySurface.cpp +++ b/DDrawCompat/RealPrimarySurface.cpp @@ -367,12 +367,8 @@ void RealPrimarySurface::setPalette() { if (s_surfaceDesc.ddpfPixelFormat.dwRGBBitCount <= 8) { - HRESULT result = CompatDirectDrawSurface::s_origVtable.SetPalette( + CompatDirectDrawSurface::s_origVtable.SetPalette( g_frontBuffer, CompatPrimarySurface::palette); - if (FAILED(result) && DDERR_NOPALETTEATTACHED != result) - { - LOG_ONCE("Failed to set the palette on the real primary surface: " << result); - } } updatePalette(0, 256);