Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
376944eb
Commit
376944eb
authored
Aug 04, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove the device-global fullscreen flag.
parent
34b37fe2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
42 deletions
+28
-42
ddraw.c
dlls/ddraw/ddraw.c
+0
-5
device.c
dlls/wined3d/device.c
+27
-33
swapchain_gdi.c
dlls/wined3d/swapchain_gdi.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
wined3d_interface.h
include/wine/wined3d_interface.h
+0
-2
No files found.
dlls/ddraw/ddraw.c
View file @
376944eb
...
...
@@ -445,9 +445,6 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
{
This
->
dest_window
=
hwnd
;
}
IWineD3DDevice_SetFullscreen
(
This
->
wineD3DDevice
,
FALSE
);
}
else
if
(
cooplevel
&
DDSCL_FULLSCREEN
)
{
...
...
@@ -467,8 +464,6 @@ IDirectDrawImpl_SetCooperativeLevel(IDirectDraw7 *iface,
*/
This
->
cooperative_level
&=
~
DDSCL_NORMAL
;
IWineD3DDevice_SetFullscreen
(
This
->
wineD3DDevice
,
TRUE
);
/* Don't override focus windows or private device windows */
if
(
hwnd
&&
...
...
dlls/wined3d/device.c
View file @
376944eb
...
...
@@ -1299,7 +1299,7 @@ static LONG fullscreen_exStyle(LONG orig_exStyle) {
return
exStyle
;
}
static
void
WINAPI
IWineD3DDeviceImpl_SetupFullscreenWindow
(
IWineD3DDevice
*
iface
,
HWND
window
)
{
static
void
WINAPI
IWineD3DDeviceImpl_SetupFullscreenWindow
(
IWineD3DDevice
*
iface
,
HWND
window
,
UINT
w
,
UINT
h
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
LONG
style
,
exStyle
;
...
...
@@ -1329,7 +1329,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupFullscreenWindow(IWineD3DDevice *ifac
/* Inform the window about the update. */
SetWindowPos
(
window
,
HWND_TOP
,
0
,
0
,
This
->
ddraw_width
,
This
->
ddraw_height
,
SWP_FRAMECHANGED
);
w
,
h
,
SWP_FRAMECHANGED
);
ShowWindow
(
window
,
SW_NORMAL
);
}
...
...
@@ -1433,8 +1433,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
object
->
win_handle
=
This
->
createParms
.
hFocusWindow
;
}
if
(
!
This
->
ddraw_window
)
{
if
(
This
->
ddraw_fullscreen
&&
object
->
win_handle
)
{
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
object
->
win_handle
);
if
(
!
pPresentationParameters
->
Windowed
&&
object
->
win_handle
)
{
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
object
->
win_handle
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
);
}
This
->
ddraw_window
=
object
->
win_handle
;
}
...
...
@@ -1528,7 +1530,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
IWineD3DDevice_SetDisplayMode
(
iface
,
0
,
&
mode
);
displaymode_set
=
TRUE
;
IWineD3DDevice_SetFullscreen
(
iface
,
TRUE
);
}
/**
...
...
@@ -2442,25 +2443,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UninitGDI(IWineD3DDevice *iface, D3DCB_
return
WINED3D_OK
;
}
static
void
WINAPI
IWineD3DDeviceImpl_SetFullscreen
(
IWineD3DDevice
*
iface
,
BOOL
fullscreen
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
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
* 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
* separately.
*/
This
->
ddraw_fullscreen
=
fullscreen
;
}
/* Enables thread safety in the wined3d device and its resources. Called by DirectDraw
* from SetCooperativeLevel if DDSCL_MULTITHREADED is specified, and by d3d8/9 from
* CreateDevice if D3DCREATE_MULTITHREADED is passed.
...
...
@@ -2529,10 +2511,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
This
->
ddraw_height
=
pMode
->
Height
;
This
->
ddraw_format
=
pMode
->
Format
;
/* Only do this with a window of course, and only if we're fullscreened */
if
(
This
->
ddraw_window
&&
This
->
ddraw_fullscreen
)
MoveWindow
(
This
->
ddraw_window
,
0
,
0
,
pMode
->
Width
,
pMode
->
Height
,
TRUE
);
/* And finally clip mouse to our screen */
SetRect
(
&
clip_rc
,
0
,
0
,
pMode
->
Width
,
pMode
->
Height
);
ClipCursor
(
&
clip_rc
);
...
...
@@ -7417,9 +7395,25 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
(
swapchain
->
presentParms
.
Windowed
&&
!
pPresentationParameters
->
Windowed
)
||
DisplayModeChanged
)
{
IWineD3DDevice_SetFullscreen
(
iface
,
!
pPresentationParameters
->
Windowed
);
swapchain
->
presentParms
.
Windowed
=
pPresentationParameters
->
Windowed
;
IWineD3DDevice_SetDisplayMode
(
iface
,
0
,
&
mode
);
if
(
This
->
ddraw_window
&&
!
pPresentationParameters
->
Windowed
)
{
if
(
swapchain
->
presentParms
.
Windowed
)
{
/* switch from windowed to fs */
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
This
->
ddraw_window
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
);
}
else
{
/* Fullscreen -> fullscreen mode change */
MoveWindow
(
This
->
ddraw_window
,
0
,
0
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
,
TRUE
);
}
}
else
if
(
This
->
ddraw_window
&&
!
swapchain
->
presentParms
.
Windowed
)
{
/* Fullscreen -> windowed switch */
IWineD3DDeviceImpl_RestoreWindow
(
iface
,
This
->
ddraw_window
);
}
swapchain
->
presentParms
.
Windowed
=
pPresentationParameters
->
Windowed
;
}
else
if
(
!
pPresentationParameters
->
Windowed
)
{
DWORD
style
=
This
->
style
,
exStyle
=
This
->
exStyle
;
/* If we're in fullscreen, and the mode wasn't changed, we have to get the window back into
...
...
@@ -7428,7 +7422,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
*/
This
->
style
=
0
;
This
->
exStyle
=
0
;
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
This
->
ddraw_window
);
IWineD3DDeviceImpl_SetupFullscreenWindow
(
iface
,
This
->
ddraw_window
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
);
This
->
style
=
style
;
This
->
exStyle
=
exStyle
;
}
...
...
@@ -7704,7 +7700,6 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_InitGDI
,
IWineD3DDeviceImpl_Uninit3D
,
IWineD3DDeviceImpl_UninitGDI
,
IWineD3DDeviceImpl_SetFullscreen
,
IWineD3DDeviceImpl_SetMultithreaded
,
IWineD3DDeviceImpl_EvictManagedResources
,
IWineD3DDeviceImpl_GetAvailableTextureMem
,
...
...
@@ -7850,7 +7845,6 @@ const IWineD3DDeviceVtbl IWineD3DDevice_DirtyConst_Vtbl =
IWineD3DDeviceImpl_InitGDI
,
IWineD3DDeviceImpl_Uninit3D
,
IWineD3DDeviceImpl_UninitGDI
,
IWineD3DDeviceImpl_SetFullscreen
,
IWineD3DDeviceImpl_SetMultithreaded
,
IWineD3DDeviceImpl_EvictManagedResources
,
IWineD3DDeviceImpl_GetAvailableTextureMem
,
...
...
dlls/wined3d/swapchain_gdi.c
View file @
376944eb
...
...
@@ -103,7 +103,7 @@ void x11_copy_to_screen(IWineD3DSwapChainImpl *This, LPRECT rc) {
/* Front buffer coordinates are screen coordinates. Map them to the destination
* window if not fullscreened
*/
if
(
!
front
->
resource
.
wineD3DDevice
->
ddraw_fullscreen
)
{
if
(
This
->
presentParms
.
Windowed
)
{
ClientToScreen
(
hDisplayWnd
,
&
offset
);
}
#if 0
...
...
dlls/wined3d/wined3d_private.h
View file @
376944eb
...
...
@@ -923,7 +923,6 @@ struct IWineD3DDeviceImpl
HWND
ddraw_window
;
DWORD
ddraw_width
,
ddraw_height
;
WINED3DFORMAT
ddraw_format
;
BOOL
ddraw_fullscreen
;
/* Final position fixup constant */
float
posFixup
[
4
];
...
...
include/wine/wined3d_interface.h
View file @
376944eb
...
...
@@ -377,7 +377,6 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD
(
InitGDI
)(
THIS_
WINED3DPRESENT_PARAMETERS
*
pPresentationParameters
,
D3DCB_CREATEADDITIONALSWAPCHAIN
D3DCB_CreateAdditionalSwapChain
);
STDMETHOD
(
Uninit3D
)(
THIS
,
D3DCB_DESTROYSURFACEFN
pFn
,
D3DCB_DESTROYSWAPCHAINFN
pFn2
);
STDMETHOD
(
UninitGDI
)(
THIS
,
D3DCB_DESTROYSWAPCHAINFN
pFn2
);
STDMETHOD_
(
void
,
SetFullscreen
)(
THIS_
BOOL
fullscreen
);
STDMETHOD_
(
void
,
SetMultithreaded
)(
THIS
);
STDMETHOD
(
EvictManagedResources
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetAvailableTextureMem
)(
THIS
)
PURE
;
...
...
@@ -518,7 +517,6 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
#define IWineD3DDevice_InitGDI(p, a, b) (p)->lpVtbl->InitGDI(p, a, b)
#define IWineD3DDevice_Uninit3D(p, a, b) (p)->lpVtbl->Uninit3D(p, a, b)
#define IWineD3DDevice_UninitGDI(p, a) (p)->lpVtbl->UninitGDI(p, a)
#define IWineD3DDevice_SetFullscreen(p, a) (p)->lpVtbl->SetFullscreen(p, a)
#define IWineD3DDevice_SetMultithreaded(p) (p)->lpVtbl->SetMultithreaded(p)
#define IWineD3DDevice_EvictManagedResources(p) (p)->lpVtbl->EvictManagedResources(p)
#define IWineD3DDevice_GetAvailableTextureMem(p) (p)->lpVtbl->GetAvailableTextureMem(p)
...
...
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