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
348c655b
Commit
348c655b
authored
Jan 26, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure transparent hardware cursors are really transparent.
Loosely based on a patch by Stefan Dösinger.
parent
3a18f54f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
device.c
dlls/wined3d/device.c
+8
-6
No files found.
dlls/wined3d/device.c
View file @
348c655b
...
@@ -5004,14 +5004,16 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
...
@@ -5004,14 +5004,16 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
if
(
cursor_image
->
resource
.
width
==
32
&&
cursor_image
->
resource
.
height
==
32
)
if
(
cursor_image
->
resource
.
width
==
32
&&
cursor_image
->
resource
.
height
==
32
)
{
{
/* Draw a hardware cursor */
UINT
mask_size
=
cursor_image
->
resource
.
width
*
cursor_image
->
resource
.
height
/
8
;
ICONINFO
cursorInfo
;
ICONINFO
cursorInfo
;
DWORD
*
maskBits
;
HCURSOR
cursor
;
HCURSOR
cursor
;
/* Create and clear maskBits because it is not needed for
* 32-bit cursors. 32x32 bits split into 32-bit chunks == 32
/* 32-bit user32 cursors ignore the alpha channel if it's all
* chunks. */
* zeroes, and use the mask instead. Fill the mask with all ones
DWORD
*
maskBits
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
* to ensure we still get a fully transparent cursor. */
(
cursor_image
->
resource
.
width
*
cursor_image
->
resource
.
height
/
8
));
maskBits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
mask_size
);
memset
(
maskBits
,
0xff
,
mask_size
);
wined3d_surface_map
(
cursor_image
,
&
mapped_rect
,
NULL
,
wined3d_surface_map
(
cursor_image
,
&
mapped_rect
,
NULL
,
WINED3DLOCK_NO_DIRTY_UPDATE
|
WINED3DLOCK_READONLY
);
WINED3DLOCK_NO_DIRTY_UPDATE
|
WINED3DLOCK_READONLY
);
TRACE
(
"width: %u height: %u.
\n
"
,
cursor_image
->
resource
.
width
,
cursor_image
->
resource
.
height
);
TRACE
(
"width: %u height: %u.
\n
"
,
cursor_image
->
resource
.
width
,
cursor_image
->
resource
.
height
);
...
...
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