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
1870353c
Commit
1870353c
authored
Aug 29, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Replace "DirectDraw stuff" with per-adapter screen information.
parent
e7f61b8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
20 deletions
+23
-20
device.c
dlls/wined3d/device.c
+18
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-5
No files found.
dlls/wined3d/device.c
View file @
1870353c
...
...
@@ -1627,7 +1627,8 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
HRESULT
CDECL
wined3d_device_set_display_mode
(
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
const
WINED3DDISPLAYMODE
*
mode
)
{
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
&
device
->
adapter
->
gl_info
,
mode
->
Format
);
struct
wined3d_adapter
*
adapter
=
device
->
adapter
;
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
&
adapter
->
gl_info
,
mode
->
Format
);
DEVMODEW
devmode
;
LONG
ret
;
RECT
clip_rc
;
...
...
@@ -1653,8 +1654,8 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
devmode
.
dmFields
|=
DM_DISPLAYFREQUENCY
;
/* Only change the mode if necessary */
if
(
device
->
ddraw_width
==
mode
->
Width
&&
device
->
ddraw_height
==
mode
->
Height
&&
device
->
ddraw
_format
==
mode
->
Format
&&
!
mode
->
RefreshRate
)
if
(
adapter
->
screen_size
.
cx
==
mode
->
Width
&&
adapter
->
screen_size
.
cy
==
mode
->
Height
&&
adapter
->
screen
_format
==
mode
->
Format
&&
!
mode
->
RefreshRate
)
return
WINED3D_OK
;
ret
=
ChangeDisplaySettingsExW
(
NULL
,
&
devmode
,
NULL
,
CDS_FULLSCREEN
,
NULL
);
...
...
@@ -1673,9 +1674,9 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
}
/* Store the new values */
device
->
ddraw_width
=
mode
->
Width
;
device
->
ddraw_height
=
mode
->
Height
;
device
->
ddraw
_format
=
mode
->
Format
;
adapter
->
screen_size
.
cx
=
mode
->
Width
;
adapter
->
screen_size
.
cy
=
mode
->
Height
;
adapter
->
screen
_format
=
mode
->
Format
;
/* And finally clip mouse to our screen */
SetRect
(
&
clip_rc
,
0
,
0
,
mode
->
Width
,
mode
->
Height
);
...
...
@@ -3939,6 +3940,8 @@ HRESULT CDECL wined3d_device_get_display_mode(struct wined3d_device *device,
}
else
{
const
struct
wined3d_adapter
*
adapter
=
device
->
adapter
;
/* Don't read the real display mode, but return the stored mode
* instead. X11 can't change the color depth, and some apps are
* pretty angry if they SetDisplayMode from 24 to 16 bpp and find out
...
...
@@ -3946,9 +3949,9 @@ HRESULT CDECL wined3d_device_get_display_mode(struct wined3d_device *device,
*
* Also don't relay to the swapchain because with ddraw it's possible
* that there isn't a swapchain at all. */
mode
->
Width
=
device
->
ddraw_width
;
mode
->
Height
=
device
->
ddraw_height
;
mode
->
Format
=
device
->
ddraw
_format
;
mode
->
Width
=
adapter
->
screen_size
.
cx
;
mode
->
Height
=
adapter
->
screen_size
.
cy
;
mode
->
Format
=
adapter
->
screen
_format
;
mode
->
RefreshRate
=
0
;
hr
=
WINED3D_OK
;
}
...
...
@@ -5291,12 +5294,12 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
}
/* MSDN: Cursor must be smaller than the display mode */
if
(
cursor_image
->
resource
.
width
>
device
->
ddraw_width
||
cursor_image
->
resource
.
height
>
device
->
ddraw_height
)
if
(
cursor_image
->
resource
.
width
>
device
->
adapter
->
screen_size
.
cx
||
cursor_image
->
resource
.
height
>
device
->
adapter
->
screen_size
.
cy
)
{
WARN
(
"Surface %p dimensions are %ux%u, but screen dimensions are %ux%u.
\n
"
,
cursor_image
,
cursor_image
->
resource
.
width
,
cursor_image
->
resource
.
height
,
device
->
ddraw_width
,
device
->
ddraw_height
);
device
->
adapter
->
screen_size
.
cx
,
device
->
adapter
->
screen_size
.
cy
);
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -6190,9 +6193,9 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
wined3d_decref
(
device
->
wined3d
);
return
hr
;
}
device
->
ddraw_width
=
mode
.
Width
;
device
->
ddraw_height
=
mode
.
Height
;
device
->
ddraw
_format
=
mode
.
Format
;
adapter
->
screen_size
.
cx
=
mode
.
Width
;
adapter
->
screen_size
.
cy
=
mode
.
Height
;
adapter
->
screen
_format
=
mode
.
Format
;
/* Save the creation parameters. */
device
->
createParms
.
AdapterOrdinal
=
adapter_idx
;
...
...
dlls/wined3d/wined3d_private.h
View file @
1870353c
...
...
@@ -1509,7 +1509,11 @@ struct wined3d_adapter
{
UINT
ordinal
;
BOOL
opengl
;
POINT
monitorPoint
;
POINT
monitorPoint
;
SIZE
screen_size
;
enum
wined3d_format_id
screen_format
;
struct
wined3d_gl_info
gl_info
;
struct
wined3d_driver_info
driver_info
;
WCHAR
DeviceName
[
CCHDEVICENAME
];
/* DeviceName for use with e.g. ChangeDisplaySettings */
...
...
@@ -1729,10 +1733,6 @@ struct wined3d_device
UINT
dummy_texture_3d
[
MAX_COMBINED_SAMPLERS
];
UINT
dummy_texture_cube
[
MAX_COMBINED_SAMPLERS
];
/* DirectDraw stuff */
DWORD
ddraw_width
,
ddraw_height
;
enum
wined3d_format_id
ddraw_format
;
/* With register combiners we can skip junk texture stages */
DWORD
texUnitMap
[
MAX_COMBINED_SAMPLERS
];
DWORD
rev_tex_unit_map
[
MAX_COMBINED_SAMPLERS
];
...
...
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