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
41fb8569
Commit
41fb8569
authored
Mar 14, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Mar 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Correctly propagate the enumproc's return value.
parent
17264271
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
font.c
dlls/gdi32/font.c
+5
-2
font.c
dlls/gdi32/tests/font.c
+9
-0
No files found.
dlls/gdi32/font.c
View file @
41fb8569
...
...
@@ -121,6 +121,7 @@ struct font_enum
LPARAM
lpData
;
BOOL
unicode
;
HDC
hdc
;
INT
retval
;
};
/*
...
...
@@ -721,6 +722,7 @@ static INT CALLBACK FONT_EnumInstance( const LOGFONTW *plf, const TEXTMETRICW *p
ptm
=
(
TEXTMETRICW
*
)
&
tmA
;
}
ret
=
pfe
->
lpEnumFunc
(
plf
,
ptm
,
fType
,
pfe
->
lpData
);
pfe
->
retval
=
ret
;
}
return
ret
;
}
...
...
@@ -745,10 +747,11 @@ static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf, FONTENUMPROCW efpro
fe
.
lpData
=
lParam
;
fe
.
unicode
=
unicode
;
fe
.
hdc
=
hDC
;
ret
=
physdev
->
funcs
->
pEnumFonts
(
physdev
,
plf
,
FONT_EnumInstance
,
(
LPARAM
)
&
fe
);
fe
.
retval
=
1
;
ret
=
physdev
->
funcs
->
pEnumFonts
(
physdev
,
plf
,
FONT_EnumInstance
,
(
LPARAM
)
&
fe
);
release_dc_ptr
(
dc
);
}
return
ret
;
return
ret
?
fe
.
retval
:
0
;
}
/***********************************************************************
...
...
dlls/gdi32/tests/font.c
View file @
41fb8569
...
...
@@ -3756,6 +3756,11 @@ static INT CALLBACK enum_all_fonts_proc(const LOGFONT *elf, const TEXTMETRIC *nt
return
1
;
}
static
INT
CALLBACK
enum_with_magic_retval_proc
(
const
LOGFONT
*
elf
,
const
TEXTMETRIC
*
ntm
,
DWORD
type
,
LPARAM
lparam
)
{
return
lparam
;
}
static
void
test_EnumFonts
(
void
)
{
int
ret
;
...
...
@@ -3777,6 +3782,10 @@ static void test_EnumFonts(void)
hdc
=
CreateCompatibleDC
(
0
);
/* check that the enumproc's retval is returned */
ret
=
EnumFontFamilies
(
hdc
,
NULL
,
enum_with_magic_retval_proc
,
0xcafe
);
ok
(
ret
==
0xcafe
,
"got %08x
\n
"
,
ret
);
ret
=
EnumFontFamilies
(
hdc
,
"Arial"
,
enum_fonts_proc
,
(
LPARAM
)
&
lf
);
ok
(
!
ret
,
"font Arial is not enumerated
\n
"
);
ret
=
strcmp
(
lf
.
lfFaceName
,
"Arial"
);
...
...
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