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
542590cf
Commit
542590cf
authored
Dec 10, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move IWineD3DDeviceImpl_SetupFullscreenWindow() to swapchain.c.
parent
a9f2613d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
49 deletions
+51
-49
device.c
dlls/wined3d/device.c
+4
-47
swapchain.c
dlls/wined3d/swapchain.c
+46
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
542590cf
...
...
@@ -919,17 +919,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
return
WINED3D_OK
;
}
/*****************************************************************************
* IWineD3DDeviceImpl_SetupFullscreenWindow
*
* Helper function that modifies a HWND's Style and ExStyle for proper
* fullscreen use.
*
* Params:
* iface: Pointer to the IWineD3DDevice interface
* window: Window to setup
*
*****************************************************************************/
static
LONG
fullscreen_style
(
LONG
orig_style
)
{
LONG
style
=
orig_style
;
style
&=
~
WS_CAPTION
;
...
...
@@ -951,38 +940,6 @@ static LONG fullscreen_exStyle(LONG orig_exStyle) {
return
exStyle
;
}
void
IWineD3DDeviceImpl_SetupFullscreenWindow
(
IWineD3DDeviceImpl
*
This
,
HWND
window
,
UINT
w
,
UINT
h
)
{
LONG
style
,
exStyle
;
/* Don't do anything if an original style is stored.
* That shouldn't happen
*/
TRACE
(
"(%p): Setting up window %p for exclusive mode
\n
"
,
This
,
window
);
if
(
This
->
style
||
This
->
exStyle
)
{
ERR
(
"(%p): Want to change the window parameters of HWND %p, but "
"another style is stored for restoration afterwards
\n
"
,
This
,
window
);
}
/* Get the parameters and save them */
style
=
GetWindowLongW
(
window
,
GWL_STYLE
);
exStyle
=
GetWindowLongW
(
window
,
GWL_EXSTYLE
);
This
->
style
=
style
;
This
->
exStyle
=
exStyle
;
style
=
fullscreen_style
(
style
);
exStyle
=
fullscreen_exStyle
(
exStyle
);
TRACE
(
"Old style was %08x,%08x, setting to %08x,%08x
\n
"
,
This
->
style
,
This
->
exStyle
,
style
,
exStyle
);
SetWindowLongW
(
window
,
GWL_STYLE
,
style
);
SetWindowLongW
(
window
,
GWL_EXSTYLE
,
exStyle
);
/* Inform the window about the update. */
SetWindowPos
(
window
,
HWND_TOP
,
0
,
0
,
w
,
h
,
SWP_FRAMECHANGED
|
SWP_SHOWWINDOW
);
}
/*****************************************************************************
* IWineD3DDeviceImpl_RestoreWindow
*
...
...
@@ -6601,8 +6558,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
if
(
swapchain
->
win_handle
&&
!
pPresentationParameters
->
Windowed
)
{
if
(
swapchain
->
presentParms
.
Windowed
)
{
/* switch from windowed to fs */
IWineD3DDeviceImpl_SetupFullscreenWindow
(
This
,
swapchain
->
win_handle
,
pPresentationParameters
->
BackBuffer
Width
,
pPresentationParameters
->
BackBuffer
Height
);
swapchain_setup_fullscreen_window
(
swapchain
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
);
}
else
{
/* Fullscreen -> fullscreen mode change */
MoveWindow
(
swapchain
->
win_handle
,
0
,
0
,
...
...
@@ -6622,8 +6579,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
*/
This
->
style
=
0
;
This
->
exStyle
=
0
;
IWineD3DDeviceImpl_SetupFullscreenWindow
(
This
,
swapchain
->
win_handle
,
pPresentationParameters
->
BackBuffer
Width
,
pPresentationParameters
->
BackBuffer
Height
);
swapchain_setup_fullscreen_window
(
swapchain
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
);
This
->
style
=
style
;
This
->
exStyle
=
exStyle
;
}
...
...
dlls/wined3d/swapchain.c
View file @
542590cf
...
...
@@ -557,6 +557,51 @@ static const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl =
IWineD3DBaseSwapChainImpl_GetGammaRamp
};
static
LONG
fullscreen_style
(
LONG
style
)
{
/* Make sure the window is managed, otherwise we won't get keyboard input. */
style
|=
WS_POPUP
|
WS_SYSMENU
;
style
&=
~
(
WS_CAPTION
|
WS_THICKFRAME
);
return
style
;
}
static
LONG
fullscreen_exstyle
(
LONG
exstyle
)
{
/* Filter out window decorations. */
exstyle
&=
~
(
WS_EX_WINDOWEDGE
|
WS_EX_CLIENTEDGE
);
return
exstyle
;
}
void
swapchain_setup_fullscreen_window
(
IWineD3DSwapChainImpl
*
swapchain
,
UINT
w
,
UINT
h
)
{
IWineD3DDeviceImpl
*
device
=
swapchain
->
device
;
HWND
window
=
swapchain
->
win_handle
;
LONG
style
,
exstyle
;
TRACE
(
"Setting up window %p for fullscreen mode.
\n
"
,
window
);
if
(
device
->
style
||
device
->
exStyle
)
{
ERR
(
"Changing the window style for window %p, but another style (%08x, %08x) is already stored.
\n
"
,
window
,
device
->
style
,
device
->
exStyle
);
}
device
->
style
=
GetWindowLongW
(
window
,
GWL_STYLE
);
device
->
exStyle
=
GetWindowLongW
(
window
,
GWL_EXSTYLE
);
style
=
fullscreen_style
(
device
->
style
);
exstyle
=
fullscreen_exstyle
(
device
->
exStyle
);
TRACE
(
"Old style was %08x, %08x, setting to %08x, %08x.
\n
"
,
device
->
style
,
device
->
exStyle
,
style
,
exstyle
);
SetWindowLongW
(
window
,
GWL_STYLE
,
style
);
SetWindowLongW
(
window
,
GWL_EXSTYLE
,
exstyle
);
SetWindowPos
(
window
,
HWND_TOP
,
0
,
0
,
w
,
h
,
SWP_FRAMECHANGED
|
SWP_SHOWWINDOW
);
}
HRESULT
swapchain_init
(
IWineD3DSwapChainImpl
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
IUnknown
*
parent
)
{
...
...
@@ -606,7 +651,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
if
(
!
present_parameters
->
Windowed
&&
window
)
{
IWineD3DDeviceImpl_SetupFullscreenWindow
(
device
,
window
,
present_parameters
->
BackBufferWidth
,
swapchain_setup_fullscreen_window
(
swapchain
,
present_parameters
->
BackBufferWidth
,
present_parameters
->
BackBufferHeight
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
542590cf
...
...
@@ -1598,7 +1598,6 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
const
WINED3DRECT
*
pRects
,
DWORD
Flags
,
WINED3DCOLOR
Color
,
float
Z
,
DWORD
Stencil
)
DECLSPEC_HIDDEN
;
void
IWineD3DDeviceImpl_FindTexUnitMap
(
IWineD3DDeviceImpl
*
This
)
DECLSPEC_HIDDEN
;
void
IWineD3DDeviceImpl_MarkStateDirty
(
IWineD3DDeviceImpl
*
This
,
DWORD
state
)
DECLSPEC_HIDDEN
;
void
IWineD3DDeviceImpl_SetupFullscreenWindow
(
IWineD3DDeviceImpl
*
This
,
HWND
window
,
UINT
w
,
UINT
h
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
isStateDirty
(
struct
wined3d_context
*
context
,
DWORD
state
)
{
...
...
@@ -2453,6 +2452,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface,
struct
wined3d_context
*
swapchain_create_context_for_thread
(
IWineD3DSwapChain
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
swapchain_init
(
IWineD3DSwapChainImpl
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
IUnknown
*
parent
)
DECLSPEC_HIDDEN
;
void
swapchain_setup_fullscreen_window
(
IWineD3DSwapChainImpl
*
swapchain
,
UINT
w
,
UINT
h
)
DECLSPEC_HIDDEN
;
#define DEFAULT_REFRESH_RATE 0
...
...
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