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); } }