From 24595d3565642ddba042105869acef253ab4e0a8 Mon Sep 17 00:00:00 2001 From: galaxyhaxz Date: Tue, 25 Jun 2019 06:33:13 -0500 Subject: [PATCH] dx_init bin exact (proper fix) --- Source/dx.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/dx.cpp b/Source/dx.cpp index fc1fd92f4..471a69a72 100644 --- a/Source/dx.cpp +++ b/Source/dx.cpp @@ -32,9 +32,9 @@ void dx_init(HWND hWnd) SetFocus(hWnd); ShowWindow(hWnd, SW_SHOWNORMAL); - lpGUID = (GUID *)DDCREATE_EMULATIONONLY; - if(!gbEmulate) { - lpGUID = NULL; + lpGUID = NULL; + if(gbEmulate) { + lpGUID = (GUID *)DDCREATE_EMULATIONONLY; } hDDVal = dx_DirectDrawCreate(lpGUID, &lpDDInterface, NULL); if(hDDVal != DD_OK) { @@ -88,9 +88,9 @@ void dx_init(HWND hWnd) #else hDDVal = lpDDInterface->lpVtbl->SetDisplayMode(lpDDInterface, winw, winh, SCREEN_BPP); #endif - if(hDDVal != DD_OK) { - ErrDlg(IDD_DIALOG1, hDDVal, "C:\\Src\\Diablo\\Source\\dx.cpp", 183); - } + } + if(hDDVal != DD_OK) { + ErrDlg(IDD_DIALOG1, hDDVal, "C:\\Src\\Diablo\\Source\\dx.cpp", 183); } }