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
82dd612d
Commit
82dd612d
authored
Nov 30, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Resize the swapchain window on mode changes in exclusive mode.
parent
d977044e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
7 deletions
+57
-7
device.c
dlls/d3d10core/device.c
+6
-0
device.c
dlls/d3d8/device.c
+6
-0
device.c
dlls/d3d9/device.c
+6
-0
ddraw.c
dlls/ddraw/ddraw.c
+33
-3
d3d.c
dlls/ddraw/tests/d3d.c
+1
-4
device.c
dlls/wined3d/device.c
+4
-0
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/d3d10core/device.c
View file @
82dd612d
...
...
@@ -1357,6 +1357,11 @@ static void CDECL device_parent_wined3d_device_created(struct wined3d_device_par
device
->
wined3d_device
=
wined3d_device
;
}
static
void
CDECL
device_parent_mode_changed
(
struct
wined3d_device_parent
*
device_parent
)
{
TRACE
(
"device_parent %p.
\n
"
,
device_parent
);
}
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
struct
wined3d_surface
**
surface
)
...
...
@@ -1538,6 +1543,7 @@ static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent
static
const
struct
wined3d_device_parent_ops
d3d10_wined3d_device_parent_ops
=
{
device_parent_wined3d_device_created
,
device_parent_mode_changed
,
device_parent_create_surface
,
device_parent_create_rendertarget
,
device_parent_create_depth_stencil
,
...
...
dlls/d3d8/device.c
View file @
82dd612d
...
...
@@ -2798,6 +2798,11 @@ static void CDECL device_parent_wined3d_device_created(struct wined3d_device_par
TRACE
(
"device_parent %p, device %p
\n
"
,
device_parent
,
device
);
}
static
void
CDECL
device_parent_mode_changed
(
struct
wined3d_device_parent
*
device_parent
)
{
TRACE
(
"device_parent %p.
\n
"
,
device_parent
);
}
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
struct
wined3d_surface
**
surface
)
...
...
@@ -2999,6 +3004,7 @@ static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent
static
const
struct
wined3d_device_parent_ops
d3d8_wined3d_device_parent_ops
=
{
device_parent_wined3d_device_created
,
device_parent_mode_changed
,
device_parent_create_surface
,
device_parent_create_rendertarget
,
device_parent_create_depth_stencil
,
...
...
dlls/d3d9/device.c
View file @
82dd612d
...
...
@@ -3043,6 +3043,11 @@ static void CDECL device_parent_wined3d_device_created(struct wined3d_device_par
TRACE
(
"device_parent %p, device %p.
\n
"
,
device_parent
,
device
);
}
static
void
CDECL
device_parent_mode_changed
(
struct
wined3d_device_parent
*
device_parent
)
{
TRACE
(
"device_parent %p.
\n
"
,
device_parent
);
}
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
struct
wined3d_surface
**
surface
)
...
...
@@ -3247,6 +3252,7 @@ static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent
static
const
struct
wined3d_device_parent_ops
d3d9_wined3d_device_parent_ops
=
{
device_parent_wined3d_device_created
,
device_parent_mode_changed
,
device_parent_create_surface
,
device_parent_create_rendertarget
,
device_parent_create_depth_stencil
,
...
...
dlls/ddraw/ddraw.c
View file @
82dd612d
...
...
@@ -1008,9 +1008,6 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD
/* TODO: Lose the primary surface */
hr
=
wined3d_device_set_display_mode
(
ddraw
->
wined3d_device
,
0
,
&
mode
);
if
(
ddraw
->
cooperative_level
&
DDSCL_EXCLUSIVE
)
SetWindowPos
(
ddraw
->
dest_window
,
HWND_TOP
,
0
,
0
,
Width
,
Height
,
SWP_SHOWWINDOW
|
SWP_NOACTIVATE
);
wined3d_mutex_unlock
();
switch
(
hr
)
...
...
@@ -5268,6 +5265,38 @@ static void CDECL device_parent_wined3d_device_created(struct wined3d_device_par
TRACE
(
"device_parent %p, device %p.
\n
"
,
device_parent
,
device
);
}
static
void
CDECL
device_parent_mode_changed
(
struct
wined3d_device_parent
*
device_parent
)
{
struct
IDirectDrawImpl
*
ddraw
=
ddraw_from_device_parent
(
device_parent
);
MONITORINFO
monitor_info
;
HMONITOR
monitor
;
BOOL
ret
;
RECT
*
r
;
TRACE
(
"device_parent %p.
\n
"
,
device_parent
);
if
(
!
(
ddraw
->
cooperative_level
&
DDSCL_EXCLUSIVE
)
||
!
ddraw
->
swapchain_window
)
{
TRACE
(
"Nothing to resize.
\n
"
);
return
;
}
monitor
=
MonitorFromWindow
(
ddraw
->
swapchain_window
,
MONITOR_DEFAULTTOPRIMARY
);
monitor_info
.
cbSize
=
sizeof
(
monitor_info
);
if
(
!
(
ret
=
GetMonitorInfoW
(
monitor
,
&
monitor_info
)))
{
ERR
(
"Failed to get monitor info.
\n
"
);
return
;
}
r
=
&
monitor_info
.
rcMonitor
;
TRACE
(
"Resizing window %p to %s.
\n
"
,
ddraw
->
swapchain_window
,
wine_dbgstr_rect
(
r
));
if
(
!
(
ret
=
SetWindowPos
(
ddraw
->
swapchain_window
,
HWND_TOP
,
r
->
left
,
r
->
top
,
r
->
right
-
r
->
left
,
r
->
bottom
-
r
->
top
,
SWP_SHOWWINDOW
|
SWP_NOACTIVATE
)))
ERR
(
"Failed to resize window.
\n
"
);
}
static
HRESULT
CDECL
device_parent_create_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
struct
wined3d_surface
**
surface
)
...
...
@@ -5424,6 +5453,7 @@ static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent
static
const
struct
wined3d_device_parent_ops
ddraw_wined3d_device_parent_ops
=
{
device_parent_wined3d_device_created
,
device_parent_mode_changed
,
device_parent_create_surface
,
device_parent_create_rendertarget
,
device_parent_create_depth_stencil
,
...
...
dlls/ddraw/tests/d3d.c
View file @
82dd612d
...
...
@@ -4175,10 +4175,7 @@ static void test_coop_level_mode_set(void)
WM_WINDOWPOSCHANGING
,
WM_WINDOWPOSCHANGED
,
WM_SIZE
,
/* WM_DISPLAYCHANGE, This message is received after WM_SIZE on native. However, the
* more important behaviour is that at the time the WM_SIZE message
* is processed SM_CXSCREEN and SM_CYSCREEN already have the new
* values. */
WM_DISPLAYCHANGE
,
0
,
};
...
...
dlls/wined3d/device.c
View file @
82dd612d
...
...
@@ -6033,6 +6033,10 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
if
(
device
->
focus_window
==
window
)
device
->
focus_window
=
NULL
;
else
ERR
(
"Window %p is not the focus window for device %p.
\n
"
,
window
,
device
);
}
else
if
(
message
==
WM_DISPLAYCHANGE
)
{
device
->
device_parent
->
ops
->
mode_changed
(
device
->
device_parent
);
}
if
(
unicode
)
return
CallWindowProcW
(
proc
,
window
,
message
,
wparam
,
lparam
);
...
...
include/wine/wined3d.h
View file @
82dd612d
...
...
@@ -2066,6 +2066,7 @@ struct wined3d_device_parent
struct
wined3d_device_parent_ops
{
void
(
__cdecl
*
wined3d_device_created
)(
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_device
*
device
);
void
(
__cdecl
*
mode_changed
)(
struct
wined3d_device_parent
*
device_parent
);
HRESULT
(
__cdecl
*
create_surface
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
WINED3DPOOL
pool
,
UINT
level
,
WINED3DCUBEMAP_FACES
face
,
struct
wined3d_surface
**
surface
);
...
...
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