Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
388499ff
Commit
388499ff
authored
Feb 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: More fullscreen window fixes.
parent
7f5dccb6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
18 deletions
+32
-18
ddraw.c
dlls/ddraw/ddraw.c
+0
-10
device.c
dlls/wined3d/device.c
+32
-4
wined3d_interface.h
include/wine/wined3d_interface.h
+0
-4
No files found.
dlls/ddraw/ddraw.c
View file @
388499ff
...
@@ -426,9 +426,6 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
...
@@ -426,9 +426,6 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
/* Restore the display mode */
/* Restore the display mode */
IDirectDraw7_RestoreDisplayMode
(
iface
);
IDirectDraw7_RestoreDisplayMode
(
iface
);
if
(
window
)
IWineD3DDevice_RestoreWindow
(
This
->
wineD3DDevice
,
window
);
This
->
cooperative_level
&=
~
DDSCL_FULLSCREEN
;
This
->
cooperative_level
&=
~
DDSCL_FULLSCREEN
;
This
->
cooperative_level
&=
~
DDSCL_EXCLUSIVE
;
This
->
cooperative_level
&=
~
DDSCL_EXCLUSIVE
;
This
->
cooperative_level
&=
~
DDSCL_ALLOWMODEX
;
This
->
cooperative_level
&=
~
DDSCL_ALLOWMODEX
;
...
@@ -476,13 +473,6 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
...
@@ -476,13 +473,6 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
!
(
This
->
devicewindow
)
&&
!
(
This
->
devicewindow
)
&&
(
hwnd
!=
window
)
)
(
hwnd
!=
window
)
)
{
{
/* On a window change, restore the old window and set the new one */
if
(
window
!=
hwnd
)
{
if
(
window
)
IWineD3DDevice_RestoreWindow
(
This
->
wineD3DDevice
,
window
);
IWineD3DDevice_SetupFullscreenWindow
(
This
->
wineD3DDevice
,
hwnd
);
}
IWineD3DDevice_SetHWND
(
This
->
wineD3DDevice
,
hwnd
);
IWineD3DDevice_SetHWND
(
This
->
wineD3DDevice
,
hwnd
);
}
}
}
}
...
...
dlls/wined3d/device.c
View file @
388499ff
...
@@ -1159,7 +1159,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupFullscreenWindow(IWineD3DDevice *ifac
...
@@ -1159,7 +1159,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupFullscreenWindow(IWineD3DDevice *ifac
* That shouldn't happen
* That shouldn't happen
*/
*/
TRACE
(
"(%p): Setting up window %p for exclusive mode
\n
"
,
This
,
window
);
TRACE
(
"(%p): Setting up window %p for exclusive mode
\n
"
,
This
,
window
);
if
(
This
->
style
&&
This
->
exStyle
)
{
if
(
This
->
style
||
This
->
exStyle
)
{
ERR
(
"(%p): Want to change the window parameters of HWND %p, but "
ERR
(
"(%p): Want to change the window parameters of HWND %p, but "
"another style is stored for restoration afterwards
\n
"
,
This
,
window
);
"another style is stored for restoration afterwards
\n
"
,
This
,
window
);
}
}
...
@@ -1404,7 +1404,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
...
@@ -1404,7 +1404,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
This
->
ddraw_height
=
devmode
.
dmPelsHeight
;
This
->
ddraw_height
=
devmode
.
dmPelsHeight
;
This
->
ddraw_format
=
*
(
pPresentationParameters
->
BackBufferFormat
);
This
->
ddraw_format
=
*
(
pPresentationParameters
->
BackBufferFormat
);
IWineD3DDevice
Impl_SetupFullscreenWindow
(
iface
,
object
->
win_handle
);
IWineD3DDevice
_SetFullscreen
(
iface
,
TRUE
);
/* And finally clip mouse to our screen */
/* And finally clip mouse to our screen */
SetRect
(
&
clip_rc
,
0
,
0
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
SetRect
(
&
clip_rc
,
0
,
0
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
...
@@ -1681,6 +1681,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
...
@@ -1681,6 +1681,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
}
}
This
->
swapchains
[
0
]
=
(
IWineD3DSwapChain
*
)
swapchain
;
This
->
swapchains
[
0
]
=
(
IWineD3DSwapChain
*
)
swapchain
;
if
(
!
This
->
ddraw_window
)
IWineD3DDevice_SetHWND
(
iface
,
swapchain
->
win_handle
);
if
(
swapchain
->
backBuffer
&&
swapchain
->
backBuffer
[
0
])
{
if
(
swapchain
->
backBuffer
&&
swapchain
->
backBuffer
[
0
])
{
TRACE
(
"Setting rendertarget to %p
\n
"
,
swapchain
->
backBuffer
);
TRACE
(
"Setting rendertarget to %p
\n
"
,
swapchain
->
backBuffer
);
This
->
render_targets
[
0
]
=
swapchain
->
backBuffer
[
0
];
This
->
render_targets
[
0
]
=
swapchain
->
backBuffer
[
0
];
...
@@ -1810,6 +1812,13 @@ static void WINAPI IWineD3DDeviceImpl_SetFullscreen(IWineD3DDevice *iface, BOOL
...
@@ -1810,6 +1812,13 @@ static void WINAPI IWineD3DDeviceImpl_SetFullscreen(IWineD3DDevice *iface, BOOL
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p) Setting DDraw fullscreen mode to %s
\n
"
,
This
,
fullscreen
?
"true"
:
"false"
);
TRACE
(
"(%p) Setting DDraw fullscreen mode to %s
\n
"
,
This
,
fullscreen
?
"true"
:
"false"
);
/* Setup the window for fullscreen mode */
if
(
fullscreen
&&
!
This
->
ddraw_fullscreen
)
{
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
This
->
ddraw_window
);
}
else
if
(
!
fullscreen
&&
This
->
ddraw_fullscreen
)
{
IWineD3DDeviceImpl_RestoreWindow
(
iface
,
This
->
ddraw_window
);
}
/* DirectDraw apps can change between fullscreen and windowed mode after device creation with
/* DirectDraw apps can change between fullscreen and windowed mode after device creation with
* IDirectDraw7::SetCooperativeLevel. The GDI surface implementation needs to know this.
* IDirectDraw7::SetCooperativeLevel. The GDI surface implementation needs to know this.
* DDraw doesn't necessarily have a swapchain, so we have to store the fullscreen flag
* DDraw doesn't necessarily have a swapchain, so we have to store the fullscreen flag
...
@@ -4006,6 +4015,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetHWND(IWineD3DDevice *iface, HWND hWn
...
@@ -4006,6 +4015,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetHWND(IWineD3DDevice *iface, HWND hWn
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
hWnd
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
hWnd
);
if
(
This
->
ddraw_fullscreen
)
{
if
(
This
->
ddraw_window
&&
This
->
ddraw_window
!=
hWnd
)
{
IWineD3DDeviceImpl_RestoreWindow
(
iface
,
This
->
ddraw_window
);
}
if
(
hWnd
&&
This
->
ddraw_window
!=
hWnd
)
{
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
hWnd
);
}
}
This
->
ddraw_window
=
hWnd
;
This
->
ddraw_window
=
hWnd
;
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
@@ -5455,7 +5473,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
...
@@ -5455,7 +5473,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
if
((
*
pPresentationParameters
->
Windowed
&&
!
swapchain
->
presentParms
.
Windowed
)
||
if
((
*
pPresentationParameters
->
Windowed
&&
!
swapchain
->
presentParms
.
Windowed
)
||
(
swapchain
->
presentParms
.
Windowed
&&
!*
pPresentationParameters
->
Windowed
)
||
(
swapchain
->
presentParms
.
Windowed
&&
!*
pPresentationParameters
->
Windowed
)
||
DisplayModeChanged
)
{
DisplayModeChanged
)
{
/* Switching to fullscreen? Change to fullscreen mode, THEN change the screen res */
if
(
!
(
*
pPresentationParameters
->
Windowed
))
{
IWineD3DDevice_SetFullscreen
(
iface
,
TRUE
);
}
IWineD3DDevice_SetDisplayMode
(
iface
,
0
,
&
mode
);
IWineD3DDevice_SetDisplayMode
(
iface
,
0
,
&
mode
);
/* Switching out of fullscreen mode? First set the original res, then change the window */
if
(
*
pPresentationParameters
->
Windowed
)
{
IWineD3DDevice_SetFullscreen
(
iface
,
FALSE
);
}
swapchain
->
presentParms
.
Windowed
=
*
pPresentationParameters
->
Windowed
;
}
}
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
...
@@ -5809,8 +5839,6 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
...
@@ -5809,8 +5839,6 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_UpdateTexture
,
IWineD3DDeviceImpl_UpdateTexture
,
IWineD3DDeviceImpl_UpdateSurface
,
IWineD3DDeviceImpl_UpdateSurface
,
IWineD3DDeviceImpl_GetFrontBufferData
,
IWineD3DDeviceImpl_GetFrontBufferData
,
IWineD3DDeviceImpl_SetupFullscreenWindow
,
IWineD3DDeviceImpl_RestoreWindow
,
/*** object tracking ***/
/*** object tracking ***/
IWineD3DDeviceImpl_ResourceReleased
IWineD3DDeviceImpl_ResourceReleased
};
};
...
...
include/wine/wined3d_interface.h
View file @
388499ff
...
@@ -470,8 +470,6 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
...
@@ -470,8 +470,6 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD
(
UpdateTexture
)(
THIS_
struct
IWineD3DBaseTexture
*
pSourceTexture
,
struct
IWineD3DBaseTexture
*
pDestinationTexture
)
PURE
;
STDMETHOD
(
UpdateTexture
)(
THIS_
struct
IWineD3DBaseTexture
*
pSourceTexture
,
struct
IWineD3DBaseTexture
*
pDestinationTexture
)
PURE
;
STDMETHOD
(
UpdateSurface
)(
THIS_
struct
IWineD3DSurface
*
pSourceSurface
,
CONST
RECT
*
pSourceRect
,
struct
IWineD3DSurface
*
pDestinationSurface
,
CONST
POINT
*
pDestPoint
)
PURE
;
STDMETHOD
(
UpdateSurface
)(
THIS_
struct
IWineD3DSurface
*
pSourceSurface
,
CONST
RECT
*
pSourceRect
,
struct
IWineD3DSurface
*
pDestinationSurface
,
CONST
POINT
*
pDestPoint
)
PURE
;
STDMETHOD
(
GetFrontBufferData
)(
THIS_
UINT
iSwapChain
,
struct
IWineD3DSurface
*
pSurface
)
PURE
;
STDMETHOD
(
GetFrontBufferData
)(
THIS_
UINT
iSwapChain
,
struct
IWineD3DSurface
*
pSurface
)
PURE
;
STDMETHOD_
(
void
,
SetupFullscreenWindow
)(
THIS_
HWND
window
)
PURE
;
STDMETHOD_
(
void
,
RestoreWindow
)(
THIS_
HWND
window
)
PURE
;
/*** object tracking ***/
/*** object tracking ***/
STDMETHOD_
(
void
,
ResourceReleased
)(
THIS_
struct
IWineD3DResource
*
resource
);
STDMETHOD_
(
void
,
ResourceReleased
)(
THIS_
struct
IWineD3DResource
*
resource
);
};
};
...
@@ -609,8 +607,6 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
...
@@ -609,8 +607,6 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
#define IWineD3DDevice_UpdateTexture(p,a,b) (p)->lpVtbl->UpdateTexture(p,a,b)
#define IWineD3DDevice_UpdateTexture(p,a,b) (p)->lpVtbl->UpdateTexture(p,a,b)
#define IWineD3DDevice_UpdateSurface(p,a,b,c,d) (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
#define IWineD3DDevice_UpdateSurface(p,a,b,c,d) (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
#define IWineD3DDevice_GetFrontBufferData(p,a,b) (p)->lpVtbl->GetFrontBufferData(p,a,b)
#define IWineD3DDevice_GetFrontBufferData(p,a,b) (p)->lpVtbl->GetFrontBufferData(p,a,b)
#define IWineD3DDevice_SetupFullscreenWindow(p, a) (p)->lpVtbl->SetupFullscreenWindow(p,a);
#define IWineD3DDevice_RestoreWindow(p, a) (p)->lpVtbl->RestoreWindow(p,a);
#define IWineD3DDevice_ResourceReleased(p,a) (p)->lpVtbl->ResourceReleased(p,a)
#define IWineD3DDevice_ResourceReleased(p,a) (p)->lpVtbl->ResourceReleased(p,a)
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment