d3d: Do not restore the display mode in ddraw.
This commit is contained in:
parent
561ebb355f
commit
93af8d3631
|
@ -305,6 +305,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateAdditionalSwapChain(LPDIRECT3DD
|
|||
localParameters.Flags = pPresentationParameters->Flags;
|
||||
localParameters.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz;
|
||||
localParameters.PresentationInterval = pPresentationParameters->FullScreen_PresentationInterval;
|
||||
localParameters.AutoRestoreDisplayMode = TRUE;
|
||||
|
||||
EnterCriticalSection(&d3d8_cs);
|
||||
hrc = IWineD3DDevice_CreateSwapChain(This->WineD3DDevice, &localParameters, &object->wineD3DSwapChain, (IUnknown*)object, D3D8CB_CreateRenderTarget, D3D8CB_CreateDepthStencilSurface, SURFACE_OPENGL);
|
||||
|
@ -358,6 +359,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRE
|
|||
localParameters.Flags = pPresentationParameters->Flags;
|
||||
localParameters.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz;
|
||||
localParameters.PresentationInterval = pPresentationParameters->FullScreen_PresentationInterval;
|
||||
localParameters.AutoRestoreDisplayMode = TRUE;
|
||||
|
||||
EnterCriticalSection(&d3d8_cs);
|
||||
hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters);
|
||||
|
|
|
@ -444,6 +444,7 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
|
|||
localParameters.Flags = pPresentationParameters->Flags;
|
||||
localParameters.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz;
|
||||
localParameters.PresentationInterval = pPresentationParameters->FullScreen_PresentationInterval;
|
||||
localParameters.AutoRestoreDisplayMode = TRUE;
|
||||
|
||||
if(BehaviourFlags & D3DCREATE_MULTITHREADED) {
|
||||
IWineD3DDevice_SetMultithreaded(object->WineD3DDevice);
|
||||
|
|
|
@ -376,6 +376,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9EX iface, D3
|
|||
localParameters.Flags = pPresentationParameters->Flags;
|
||||
localParameters.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz;
|
||||
localParameters.PresentationInterval = pPresentationParameters->PresentationInterval;
|
||||
localParameters.AutoRestoreDisplayMode = TRUE;
|
||||
|
||||
EnterCriticalSection(&d3d9_cs);
|
||||
hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters);
|
||||
|
|
|
@ -515,6 +515,7 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adap
|
|||
localParameters.Flags = pPresentationParameters->Flags;
|
||||
localParameters.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz;
|
||||
localParameters.PresentationInterval = pPresentationParameters->PresentationInterval;
|
||||
localParameters.AutoRestoreDisplayMode = TRUE;
|
||||
|
||||
if(BehaviourFlags & D3DCREATE_MULTITHREADED) {
|
||||
IWineD3DDevice_SetMultithreaded(object->WineD3DDevice);
|
||||
|
|
|
@ -72,7 +72,7 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
|
|||
* this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution
|
||||
* before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params
|
||||
*/
|
||||
if(This->presentParms.Windowed == FALSE) {
|
||||
if(This->presentParms.Windowed == FALSE && This->presentParms.AutoRestoreDisplayMode) {
|
||||
mode.Width = This->orig_width;
|
||||
mode.Height = This->orig_height;
|
||||
mode.RefreshRate = 0;
|
||||
|
|
|
@ -59,7 +59,7 @@ static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
|
|||
* this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution
|
||||
* before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params
|
||||
*/
|
||||
if(This->presentParms.Windowed == FALSE) {
|
||||
if(This->presentParms.Windowed == FALSE && This->presentParms.AutoRestoreDisplayMode) {
|
||||
mode.Width = This->orig_width;
|
||||
mode.Height = This->orig_height;
|
||||
mode.RefreshRate = 0;
|
||||
|
|
|
@ -886,6 +886,7 @@ typedef struct _WINED3DPRESENT_PARAMETERS {
|
|||
DWORD Flags;
|
||||
UINT FullScreen_RefreshRateInHz;
|
||||
UINT PresentationInterval;
|
||||
BOOL AutoRestoreDisplayMode;
|
||||
} WINED3DPRESENT_PARAMETERS;
|
||||
|
||||
#define WINED3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x00000001
|
||||
|
|
Loading…
Reference in New Issue