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
9773414d
Commit
9773414d
authored
Jan 19, 2005
by
Vitaly Lipatov
Committed by
Alexandre Julliard
Jan 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add FIXME for file with broken counters.
parent
7b9fb6ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
cursoricon.c
windows/cursoricon.c
+14
-4
No files found.
windows/cursoricon.c
View file @
9773414d
...
...
@@ -117,8 +117,9 @@ static WORD ICON_HOTSPOT = 0x4242;
* Helper function to map a file to memory:
* name - file name
* [RETURN] ptr - pointer to mapped file
* [RETURN] filesize - pointer size of file to be stored if not NULL
*/
static
void
*
map_fileW
(
LPCWSTR
name
)
static
void
*
map_fileW
(
LPCWSTR
name
,
LPDWORD
filesize
)
{
HANDLE
hFile
,
hMapping
;
LPVOID
ptr
=
NULL
;
...
...
@@ -128,12 +129,14 @@ static void *map_fileW( LPCWSTR name )
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
{
hMapping
=
CreateFileMappingW
(
hFile
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
CloseHandle
(
hFile
);
if
(
hMapping
)
{
ptr
=
MapViewOfFile
(
hMapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
CloseHandle
(
hMapping
);
if
(
filesize
)
*
filesize
=
GetFileSize
(
hFile
,
NULL
);
}
CloseHandle
(
hFile
);
}
return
ptr
;
}
...
...
@@ -573,12 +576,13 @@ static BOOL CURSORICON_SimulateLoadingFromResourceW( LPCWSTR filename, BOOL fCur
CURSORICONDIR
**
res
,
LPBYTE
**
ptr
)
{
LPBYTE
_free
;
DWORD
filesize
;
CURSORICONFILEDIR
*
bits
;
int
entries
,
size
,
i
;
*
res
=
NULL
;
*
ptr
=
NULL
;
if
(
!
(
bits
=
map_fileW
(
filename
)))
return
FALSE
;
if
(
!
(
bits
=
map_fileW
(
filename
,
&
filesize
)))
return
FALSE
;
/* FIXME: test for inimated icons
* hack to load the first icon from the *.ani file
...
...
@@ -603,6 +607,12 @@ static BOOL CURSORICON_SimulateLoadingFromResourceW( LPCWSTR filename, BOOL fCur
}
}
if
(
!
(
entries
=
bits
->
idCount
))
goto
fail
;
if
(
(
sizeof
(
CURSORICONFILEDIR
)
+
sizeof
(
CURSORICONFILEDIRENTRY
)
*
(
entries
-
1
))
>
filesize
)
{
FIXME
(
"broken file %s
\n
"
,
wine_dbgstr_w
(
filename
));
goto
fail
;
}
size
=
sizeof
(
CURSORICONDIR
)
+
sizeof
(
CURSORICONDIRENTRY
)
*
(
entries
-
1
);
_free
=
(
LPBYTE
)
size
;
...
...
@@ -2110,7 +2120,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, UINT loadflags )
}
else
{
if
(
!
(
ptr
=
map_fileW
(
name
)))
return
0
;
if
(
!
(
ptr
=
map_fileW
(
name
,
NULL
)))
return
0
;
info
=
(
BITMAPINFO
*
)(
ptr
+
sizeof
(
BITMAPFILEHEADER
));
}
...
...
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