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
671b4d12
Commit
671b4d12
authored
Dec 21, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Get rid of the CURSORICON_Copy internal function.
parent
7de210fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
27 deletions
+16
-27
cursoricon.c
dlls/user32/cursoricon.c
+16
-27
No files found.
dlls/user32/cursoricon.c
View file @
671b4d12
...
...
@@ -1257,29 +1257,6 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
return
hIcon
;
}
/***********************************************************************
* CURSORICON_Copy
*
* Make a copy of a cursor or icon.
*/
static
HICON
CURSORICON_Copy
(
HINSTANCE16
hInst16
,
HICON
hIcon
)
{
char
*
ptrOld
,
*
ptrNew
;
int
size
;
HICON16
hOld
=
HICON_16
(
hIcon
);
HICON16
hNew
;
if
(
!
(
ptrOld
=
GlobalLock16
(
hOld
)))
return
0
;
if
(
hInst16
&&
!
(
hInst16
=
GetExePtr
(
hInst16
)))
return
0
;
size
=
GlobalSize16
(
hOld
);
hNew
=
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
);
FarSetOwner16
(
hNew
,
hInst16
);
ptrNew
=
GlobalLock16
(
hNew
);
memcpy
(
ptrNew
,
ptrOld
,
size
);
GlobalUnlock16
(
hOld
);
GlobalUnlock16
(
hNew
);
return
HICON_32
(
hNew
);
}
/*************************************************************************
* CURSORICON_ExtCopy
...
...
@@ -1329,7 +1306,7 @@ static HICON CURSORICON_ExtCopy(HICON hIcon, UINT nType,
*/
if
(
pIconCache
==
NULL
)
{
hNew
=
C
URSORICON_Copy
(
0
,
hIcon
);
hNew
=
C
opyIcon
(
hIcon
);
if
(
nFlags
&
LR_COPYFROMRESOURCE
)
{
TRACE_
(
icon
)(
"LR_COPYFROMRESOURCE: Failed to load from cache
\n
"
);
...
...
@@ -1418,7 +1395,7 @@ static HICON CURSORICON_ExtCopy(HICON hIcon, UINT nType,
FreeResource
(
hMem
);
}
}
else
hNew
=
C
URSORICON_Copy
(
0
,
hIcon
);
else
hNew
=
C
opyIcon
(
hIcon
);
return
hNew
;
}
...
...
@@ -1571,8 +1548,20 @@ HICON16 WINAPI CopyIcon16( HINSTANCE16 hInstance, HICON16 hIcon )
*/
HICON
WINAPI
CopyIcon
(
HICON
hIcon
)
{
TRACE_
(
icon
)(
"%p
\n
"
,
hIcon
);
return
CURSORICON_Copy
(
0
,
hIcon
);
char
*
ptrOld
,
*
ptrNew
;
int
size
;
HICON16
hOld
=
HICON_16
(
hIcon
);
HICON16
hNew
;
if
(
!
(
ptrOld
=
GlobalLock16
(
hOld
)))
return
0
;
size
=
GlobalSize16
(
hOld
);
hNew
=
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
);
FarSetOwner16
(
hNew
,
0
);
ptrNew
=
GlobalLock16
(
hNew
);
memcpy
(
ptrNew
,
ptrOld
,
size
);
GlobalUnlock16
(
hOld
);
GlobalUnlock16
(
hNew
);
return
HICON_32
(
hNew
);
}
...
...
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