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
0b362f6f
Commit
0b362f6f
authored
Jan 18, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Pass an IDirectDrawImpl* instead of an iface to ddraw_set_display_mode().
parent
b3ced2fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
ddraw.c
dlls/ddraw/ddraw.c
+11
-12
No files found.
dlls/ddraw/ddraw.c
View file @
0b362f6f
...
@@ -762,15 +762,14 @@ static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window
...
@@ -762,15 +762,14 @@ static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window
* ddraw7_SetDisplayMode.
* ddraw7_SetDisplayMode.
*
*
*****************************************************************************/
*****************************************************************************/
static
HRESULT
ddraw_set_display_mode
(
IDirectDraw
7
*
iface
,
DWORD
Width
,
DWORD
Height
,
static
HRESULT
ddraw_set_display_mode
(
IDirectDraw
Impl
*
ddraw
,
DWORD
Width
,
DWORD
Height
,
DWORD
BPP
,
DWORD
RefreshRate
,
DWORD
Flags
)
DWORD
BPP
,
DWORD
RefreshRate
,
DWORD
Flags
)
{
{
IDirectDrawImpl
*
This
=
(
IDirectDrawImpl
*
)
iface
;
WINED3DDISPLAYMODE
Mode
;
WINED3DDISPLAYMODE
Mode
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"
iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.
\n
"
,
TRACE
(
"
ddraw %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.
\n
"
,
ddraw
,
Width
,
iface
,
Width
,
Height
,
BPP
,
RefreshRate
,
Flags
);
Height
,
BPP
,
RefreshRate
,
Flags
);
EnterCriticalSection
(
&
ddraw_cs
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
!
Width
||
!
Height
)
if
(
!
Width
||
!
Height
)
...
@@ -782,7 +781,7 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He
...
@@ -782,7 +781,7 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He
}
}
/* Check the exclusive mode
/* Check the exclusive mode
if(!(
This
->cooperative_level & DDSCL_EXCLUSIVE))
if(!(
ddraw
->cooperative_level & DDSCL_EXCLUSIVE))
return DDERR_NOEXCLUSIVEMODE;
return DDERR_NOEXCLUSIVEMODE;
* This is WRONG. Don't know if the SDK is completely
* This is WRONG. Don't know if the SDK is completely
* wrong and if there are any conditions when DDERR_NOEXCLUSIVE
* wrong and if there are any conditions when DDERR_NOEXCLUSIVE
...
@@ -808,11 +807,9 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He
...
@@ -808,11 +807,9 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He
*/
*/
/* TODO: Lose the primary surface */
/* TODO: Lose the primary surface */
hr
=
IWineD3DDevice_SetDisplayMode
(
This
->
wineD3DDevice
,
hr
=
IWineD3DDevice_SetDisplayMode
(
ddraw
->
wineD3DDevice
,
0
,
&
Mode
);
0
,
/* First swapchain */
IWineD3DDevice_RestoreFullscreenWindow
(
ddraw
->
wineD3DDevice
,
ddraw
->
dest_window
);
&
Mode
);
IWineD3DDevice_SetupFullscreenWindow
(
ddraw
->
wineD3DDevice
,
ddraw
->
dest_window
,
Width
,
Height
);
IWineD3DDevice_RestoreFullscreenWindow
(
This
->
wineD3DDevice
,
This
->
dest_window
);
IWineD3DDevice_SetupFullscreenWindow
(
This
->
wineD3DDevice
,
This
->
dest_window
,
Width
,
Height
);
LeaveCriticalSection
(
&
ddraw_cs
);
LeaveCriticalSection
(
&
ddraw_cs
);
switch
(
hr
)
switch
(
hr
)
{
{
...
@@ -846,6 +843,8 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He
...
@@ -846,6 +843,8 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He
static
HRESULT
WINAPI
ddraw7_SetDisplayMode
(
IDirectDraw7
*
iface
,
DWORD
Width
,
DWORD
Height
,
static
HRESULT
WINAPI
ddraw7_SetDisplayMode
(
IDirectDraw7
*
iface
,
DWORD
Width
,
DWORD
Height
,
DWORD
BPP
,
DWORD
RefreshRate
,
DWORD
Flags
)
DWORD
BPP
,
DWORD
RefreshRate
,
DWORD
Flags
)
{
{
IDirectDrawImpl
*
This
=
(
IDirectDrawImpl
*
)
iface
;
TRACE
(
"iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.
\n
"
,
TRACE
(
"iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.
\n
"
,
iface
,
Width
,
Height
,
BPP
,
RefreshRate
,
Flags
);
iface
,
Width
,
Height
,
BPP
,
RefreshRate
,
Flags
);
...
@@ -856,7 +855,7 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD Width, DW
...
@@ -856,7 +855,7 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD Width, DW
RefreshRate
=
force_refresh_rate
;
RefreshRate
=
force_refresh_rate
;
}
}
return
ddraw_set_display_mode
(
iface
,
Width
,
Height
,
BPP
,
RefreshRate
,
Flags
);
return
ddraw_set_display_mode
(
This
,
Width
,
Height
,
BPP
,
RefreshRate
,
Flags
);
}
}
static
HRESULT
WINAPI
ddraw4_SetDisplayMode
(
IDirectDraw4
*
iface
,
static
HRESULT
WINAPI
ddraw4_SetDisplayMode
(
IDirectDraw4
*
iface
,
...
@@ -923,7 +922,7 @@ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface)
...
@@ -923,7 +922,7 @@ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface)
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_set_display_mode
(
iface
,
This
->
orig_width
,
This
->
orig_height
,
This
->
orig_bpp
,
0
,
0
);
return
ddraw_set_display_mode
(
This
,
This
->
orig_width
,
This
->
orig_height
,
This
->
orig_bpp
,
0
,
0
);
}
}
static
HRESULT
WINAPI
ddraw4_RestoreDisplayMode
(
IDirectDraw4
*
iface
)
static
HRESULT
WINAPI
ddraw4_RestoreDisplayMode
(
IDirectDraw4
*
iface
)
...
...
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