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
5f96c5e2
Commit
5f96c5e2
authored
Jul 29, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Setup/restore fullscreen window state inside wined3d.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f49b27ce
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
51 deletions
+27
-51
device.c
dlls/d3d8/device.c
+1
-9
device.c
dlls/d3d9/device.c
+0
-10
ddraw.c
dlls/ddraw/ddraw.c
+0
-15
device.c
dlls/wined3d/device.c
+3
-3
swapchain.c
dlls/wined3d/swapchain.c
+19
-8
wined3d.spec
dlls/wined3d/wined3d.spec
+0
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-0
wined3d.h
include/wine/wined3d.h
+0
-4
No files found.
dlls/d3d8/device.c
View file @
5f96c5e2
...
...
@@ -3602,10 +3602,8 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
if
(
!
parameters
->
Windowed
)
{
HWND
device_window
=
parameters
->
hDeviceWindow
;
if
(
!
focus_window
)
focus_window
=
device_w
indow
;
focus_window
=
parameters
->
hDeviceW
indow
;
if
(
FAILED
(
hr
=
wined3d_device_acquire_focus_window
(
device
->
wined3d_device
,
focus_window
)))
{
ERR
(
"Failed to acquire focus window, hr %#x.
\n
"
,
hr
);
...
...
@@ -3614,12 +3612,6 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
heap_free
(
device
->
handle_table
.
entries
);
return
hr
;
}
if
(
!
device_window
)
device_window
=
focus_window
;
wined3d_device_setup_fullscreen_window
(
device
->
wined3d_device
,
device_window
,
parameters
->
BackBufferWidth
,
parameters
->
BackBufferHeight
);
}
if
(
flags
&
D3DCREATE_MULTITHREADED
)
...
...
dlls/d3d9/device.c
View file @
5f96c5e2
...
...
@@ -4503,16 +4503,6 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
wined3d_mutex_unlock
();
return
hr
;
}
for
(
i
=
0
;
i
<
count
;
++
i
)
{
HWND
device_window
=
parameters
[
i
].
hDeviceWindow
;
if
(
!
device_window
)
device_window
=
focus_window
;
wined3d_device_setup_fullscreen_window
(
device
->
wined3d_device
,
device_window
,
parameters
[
i
].
BackBufferWidth
,
parameters
[
i
].
BackBufferHeight
);
}
}
if
(
!
(
swapchain_desc
=
heap_alloc
(
sizeof
(
*
swapchain_desc
)
*
count
)))
...
...
dlls/ddraw/ddraw.c
View file @
5f96c5e2
...
...
@@ -884,21 +884,6 @@ static HRESULT ddraw_set_cooperative_level(struct ddraw *ddraw, HWND window,
ddraw
->
focuswindow
=
NULL
;
}
if
((
cooplevel
&
DDSCL_FULLSCREEN
)
!=
(
ddraw
->
cooperative_level
&
DDSCL_FULLSCREEN
)
||
window
!=
ddraw
->
dest_window
)
{
if
(
ddraw
->
cooperative_level
&
DDSCL_FULLSCREEN
)
wined3d_device_restore_fullscreen_window
(
ddraw
->
wined3d_device
,
ddraw
->
dest_window
,
NULL
);
if
(
cooplevel
&
DDSCL_FULLSCREEN
)
{
struct
wined3d_display_mode
display_mode
;
wined3d_get_adapter_display_mode
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
&
display_mode
,
NULL
);
wined3d_device_setup_fullscreen_window
(
ddraw
->
wined3d_device
,
window
,
display_mode
.
width
,
display_mode
.
height
);
}
}
if
((
cooplevel
&
DDSCL_EXCLUSIVE
)
&&
exclusive_window
!=
window
)
{
ddraw
->
device_state
=
DDRAW_DEVICE_STATE_NOT_RESTORED
;
...
...
dlls/wined3d/device.c
View file @
5f96c5e2
...
...
@@ -927,7 +927,7 @@ static LONG fullscreen_exstyle(LONG exstyle)
return
exstyle
;
}
HRESULT
CDECL
wined3d_device_setup_fullscreen_window
(
struct
wined3d_device
*
device
,
HRESULT
wined3d_device_setup_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
unsigned
int
w
,
unsigned
int
h
)
{
BOOL
filter_messages
;
...
...
@@ -968,8 +968,8 @@ HRESULT CDECL wined3d_device_setup_fullscreen_window(struct wined3d_device *devi
return
WINED3D_OK
;
}
void
CDECL
wined3d_device_restore_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
const
RECT
*
window_rect
)
void
wined3d_device_restore_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
const
RECT
*
window_rect
)
{
unsigned
int
window_pos_flags
=
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOACTIVATE
;
BOOL
filter_messages
;
...
...
dlls/wined3d/swapchain.c
View file @
5f96c5e2
...
...
@@ -75,17 +75,24 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
* desktop resolution. In case of d3d7 this will be a NOP because ddraw
* sets the resolution before starting up Direct3D, thus orig_width and
* orig_height will be equal to the modes in the presentation params. */
if
(
!
swapchain
->
desc
.
windowed
&&
swapchain
->
desc
.
auto_restore_display_mode
)
if
(
!
swapchain
->
desc
.
windowed
)
{
if
(
FAILED
(
hr
=
wined3d_set_adapter_display_mode
(
swapchain
->
device
->
wined3d
,
swapchain
->
device
->
adapter
->
ordinal
,
&
swapchain
->
original_mode
)))
ERR
(
"Failed to restore display mode, hr %#x.
\n
"
,
hr
);
if
(
swapchain
->
desc
.
auto_restore_display_mode
)
{
if
(
FAILED
(
hr
=
wined3d_set_adapter_display_mode
(
swapchain
->
device
->
wined3d
,
swapchain
->
device
->
adapter
->
ordinal
,
&
swapchain
->
original_mode
)))
ERR
(
"Failed to restore display mode, hr %#x.
\n
"
,
hr
);
if
(
swapchain
->
desc
.
flags
&
WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT
)
if
(
swapchain
->
desc
.
flags
&
WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT
)
{
wined3d_device_restore_fullscreen_window
(
swapchain
->
device
,
swapchain
->
device_window
,
&
swapchain
->
original_window_rect
);
wined3d_device_release_focus_window
(
swapchain
->
device
);
}
}
else
{
wined3d_device_restore_fullscreen_window
(
swapchain
->
device
,
swapchain
->
device_window
,
&
swapchain
->
original_window_rect
);
wined3d_device_release_focus_window
(
swapchain
->
device
);
wined3d_device_restore_fullscreen_window
(
swapchain
->
device
,
swapchain
->
device_window
,
NULL
);
}
}
...
...
@@ -802,6 +809,10 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
TRACE
(
"Updating format to %s.
\n
"
,
debug_d3dformat
(
swapchain
->
original_mode
.
format_id
));
}
}
else
{
wined3d_device_setup_fullscreen_window
(
device
,
window
,
desc
->
backbuffer_width
,
desc
->
backbuffer_height
);
}
swapchain
->
desc
=
*
desc
;
wined3d_swapchain_apply_sample_count_override
(
swapchain
,
swapchain
->
desc
.
backbuffer_format
,
&
swapchain
->
desc
.
multisample_type
,
&
swapchain
->
desc
.
multisample_quality
);
...
...
dlls/wined3d/wined3d.spec
View file @
5f96c5e2
...
...
@@ -127,7 +127,6 @@
@ cdecl wined3d_device_release_focus_window(ptr)
@ cdecl wined3d_device_reset(ptr ptr ptr ptr long)
@ cdecl wined3d_device_resolve_sub_resource(ptr ptr long ptr long long)
@ cdecl wined3d_device_restore_fullscreen_window(ptr ptr ptr)
@ cdecl wined3d_device_set_base_vertex_index(ptr long)
@ cdecl wined3d_device_set_blend_state(ptr ptr ptr)
@ cdecl wined3d_device_set_clip_plane(ptr long ptr)
...
...
@@ -187,7 +186,6 @@
@ cdecl wined3d_device_set_vs_consts_i(ptr long long ptr)
@ cdecl wined3d_device_set_vs_resource_view(ptr long ptr)
@ cdecl wined3d_device_set_vs_sampler(ptr long ptr)
@ cdecl wined3d_device_setup_fullscreen_window(ptr ptr long long)
@ cdecl wined3d_device_show_cursor(ptr long)
@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long long)
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
...
...
dlls/wined3d/wined3d_private.h
View file @
5f96c5e2
...
...
@@ -3255,8 +3255,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
void
device_resource_add
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
void
device_resource_released
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
void
device_invalidate_state
(
const
struct
wined3d_device
*
device
,
DWORD
state
)
DECLSPEC_HIDDEN
;
void
wined3d_device_restore_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
const
RECT
*
window_rect
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_device_set_implicit_swapchain
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_device_setup_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
unsigned
int
w
,
unsigned
int
h
)
DECLSPEC_HIDDEN
;
void
wined3d_device_uninit_3d
(
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
struct
wined3d_device_no3d
...
...
include/wine/wined3d.h
View file @
5f96c5e2
...
...
@@ -2378,8 +2378,6 @@ void __cdecl wined3d_device_resolve_sub_resource(struct wined3d_device *device,
struct
wined3d_resource
*
dst_resource
,
unsigned
int
dst_sub_resource_idx
,
struct
wined3d_resource
*
src_resource
,
unsigned
int
src_sub_resource_idx
,
enum
wined3d_format_id
format_id
);
void
__cdecl
wined3d_device_restore_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
const
RECT
*
window_rect
);
void
__cdecl
wined3d_device_set_base_vertex_index
(
struct
wined3d_device
*
device
,
INT
base_index
);
void
__cdecl
wined3d_device_set_blend_state
(
struct
wined3d_device
*
device
,
struct
wined3d_blend_state
*
blend_state
,
const
struct
wined3d_color
*
blend_factor
);
...
...
@@ -2479,8 +2477,6 @@ HRESULT __cdecl wined3d_device_set_vs_consts_i(struct wined3d_device *device,
void
__cdecl
wined3d_device_set_vs_resource_view
(
struct
wined3d_device
*
device
,
UINT
idx
,
struct
wined3d_shader_resource_view
*
view
);
void
__cdecl
wined3d_device_set_vs_sampler
(
struct
wined3d_device
*
device
,
UINT
idx
,
struct
wined3d_sampler
*
sampler
);
HRESULT
__cdecl
wined3d_device_setup_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
,
unsigned
int
w
,
unsigned
int
h
);
BOOL
__cdecl
wined3d_device_show_cursor
(
struct
wined3d_device
*
device
,
BOOL
show
);
void
__cdecl
wined3d_device_update_sub_resource
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
,
const
struct
wined3d_box
*
box
,
const
void
*
data
,
unsigned
int
row_pitch
,
...
...
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