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
c2c0743c
Commit
c2c0743c
authored
Jun 22, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly retrieve the display mode in wined3d_device_set_cursor_properties().
parent
70008999
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
device.c
dlls/wined3d/device.c
+10
-5
directx.c
dlls/wined3d/directx.c
+0
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/device.c
View file @
c2c0743c
...
...
@@ -4800,7 +4800,9 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
if
(
cursor_image
)
{
struct
wined3d_display_mode
mode
;
struct
wined3d_map_desc
map_desc
;
HRESULT
hr
;
/* MSDN: Cursor must be A8R8G8B8 */
if
(
cursor_image
->
resource
.
format
->
id
!=
WINED3DFMT_B8G8R8A8_UNORM
)
...
...
@@ -4809,13 +4811,18 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
return
WINED3DERR_INVALIDCALL
;
}
if
(
FAILED
(
hr
=
wined3d_get_adapter_display_mode
(
device
->
wined3d
,
device
->
adapter
->
ordinal
,
&
mode
)))
{
ERR
(
"Failed to get display mode, hr %#x.
\n
"
,
hr
);
return
WINED3DERR_INVALIDCALL
;
}
/* MSDN: Cursor must be smaller than the display mode */
if
(
cursor_image
->
resource
.
width
>
device
->
adapter
->
screen_size
.
cx
||
cursor_image
->
resource
.
height
>
device
->
adapter
->
screen_size
.
cy
)
if
(
cursor_image
->
resource
.
width
>
mode
.
width
||
cursor_image
->
resource
.
height
>
mode
.
height
)
{
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
->
adapter
->
screen_size
.
cx
,
device
->
adapter
->
screen_size
.
cy
);
mode
.
width
,
mode
.
height
);
return
WINED3DERR_INVALIDCALL
;
}
...
...
@@ -5694,8 +5701,6 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
wined3d_decref
(
device
->
wined3d
);
return
hr
;
}
adapter
->
screen_size
.
cx
=
mode
.
width
;
adapter
->
screen_size
.
cy
=
mode
.
height
;
adapter
->
screen_format
=
mode
.
format_id
;
/* Save the creation parameters. */
...
...
dlls/wined3d/directx.c
View file @
c2c0743c
...
...
@@ -3136,8 +3136,6 @@ HRESULT CDECL wined3d_set_adapter_display_mode(struct wined3d *wined3d,
}
/* Store the new values. */
adapter
->
screen_size
.
cx
=
mode
->
width
;
adapter
->
screen_size
.
cy
=
mode
->
height
;
adapter
->
screen_format
=
mode
->
format_id
;
/* And finally clip mouse to our screen. */
...
...
dlls/wined3d/wined3d_private.h
View file @
c2c0743c
...
...
@@ -1543,7 +1543,6 @@ struct wined3d_adapter
BOOL
opengl
;
POINT
monitorPoint
;
SIZE
screen_size
;
enum
wined3d_format_id
screen_format
;
struct
wined3d_gl_info
gl_info
;
...
...
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