From 5770c990ed7dccefcdb5ef0db9b046fcaed42611 Mon Sep 17 00:00:00 2001 From: narzoul Date: Sat, 17 Mar 2018 13:11:45 +0100 Subject: [PATCH] Fixed GDI resource handle initialization --- DDrawCompat/DDraw/Surfaces/PrimarySurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDrawCompat/DDraw/Surfaces/PrimarySurface.cpp b/DDrawCompat/DDraw/Surfaces/PrimarySurface.cpp index 3b4399a..8312892 100644 --- a/DDrawCompat/DDraw/Surfaces/PrimarySurface.cpp +++ b/DDrawCompat/DDraw/Surfaces/PrimarySurface.cpp @@ -73,7 +73,6 @@ namespace DDraw std::unique_ptr privateData(new PrimarySurface(Surface::getSurface(*surface))); attach(*surface7, privateData); - g_gdiResourceHandle = getResourceHandle(*surface7); g_primarySurface = surface7; g_origCaps = origCaps; @@ -86,6 +85,7 @@ namespace DDraw resizeBuffers(*surface7); } + g_gdiResourceHandle = getResourceHandle(*surface7); return DD_OK; }