# HG changeset patch # User zipi # Date 1383394608 0 # Node ID ef4dcee1b4a170ab68e6b0e5a54e33110fbb0010 # Parent b00f5bb7d9304497fdd32c1eff7708aae7dc6d72 Multi-monitor support part1 diff -r b00f5bb7d930 -r ef4dcee1b4a1 OSWindow.cpp --- a/OSWindow.cpp Sat Nov 02 10:14:14 2013 +0000 +++ b/OSWindow.cpp Sat Nov 02 12:16:48 2013 +0000 @@ -687,6 +687,7 @@ case 103: pRenderer->SavePCXScreenshot(); break; case 101: // Quit game case 40001: + pGame->Deinitialize(); SendMessageW(api_handle, WM_DESTROY, 0, 0); break; diff -r b00f5bb7d930 -r ef4dcee1b4a1 Render.cpp --- a/Render.cpp Sat Nov 02 10:14:14 2013 +0000 +++ b/Render.cpp Sat Nov 02 12:16:48 2013 +0000 @@ -1201,7 +1201,7 @@ v2 = new RenderD3D__DevInfo[4];// 4 items *pOutDevices = v2; memset(v2, 0, 0xA0u); - DirectDrawEnumerateA((LPDDENUMCALLBACKA)RenderD3D__DeviceEnumerator, *pOutDevices); + DirectDrawEnumerateExA((LPDDENUMCALLBACKEXA)RenderD3D__DeviceEnumerator, *pOutDevices, DDENUM_ATTACHEDSECONDARYDEVICES); } //----- (0049DC58) -------------------------------------------------------- @@ -2106,7 +2106,7 @@ //windowed_mode_width = windowed_width; //windowed_mode_height = windowed_height; - uDesiredDirect3DDevice = 0;//ReadWindowsRegistryInt("D3D Device", 1); + uDesiredDirect3DDevice = ReadWindowsRegistryInt("D3D Device", 0); bUseColoredLights = bColoredLights;//ReadWindowsRegistryInt("Colored Lights", 0); uLevelOfDetail = uDetailLevel;//ReadWindowsRegistryInt("Detail Level", 1); @@ -3184,7 +3184,7 @@ Error("There aren't any D3D devices to create."); v8 = pRenderD3D->CreateDevice(0, 0, window->GetApiHandle()); - uAcquiredDirect3DDevice = 0; + uAcquiredDirect3DDevice = 1; } } if ( !v8 ) diff -r b00f5bb7d930 -r ef4dcee1b4a1 mm7_2.cpp --- a/mm7_2.cpp Sat Nov 02 10:14:14 2013 +0000 +++ b/mm7_2.cpp Sat Nov 02 12:16:48 2013 +0000 @@ -3994,7 +3994,7 @@ } else { - window->SetWindowedMode(game_width, game_height); + //window->SetWindowedMode(game_width, game_height); pRenderer->SwitchToWindow(); }