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
b5df43b9
Commit
b5df43b9
authored
Apr 01, 2020
by
Matteo Bruni
Committed by
Alexandre Julliard
Apr 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Switch character count to unsigned int in the DrawText implementation.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8f0e32b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
font.c
dlls/d3dx9_36/font.c
+8
-8
No files found.
dlls/d3dx9_36/font.c
View file @
b5df43b9
...
@@ -552,11 +552,11 @@ static void word_break(HDC hdc, const WCHAR *str, unsigned int *str_len,
...
@@ -552,11 +552,11 @@ static void word_break(HDC hdc, const WCHAR *str, unsigned int *str_len,
heap_free
(
sla
);
heap_free
(
sla
);
}
}
static
const
WCHAR
*
read_line
(
HDC
hdc
,
const
WCHAR
*
str
,
int
*
count
,
static
const
WCHAR
*
read_line
(
HDC
hdc
,
const
WCHAR
*
str
,
unsigned
int
*
count
,
WCHAR
*
dest
,
unsigned
int
*
dest_len
,
int
width
,
DWORD
format
,
SIZE
*
size
)
WCHAR
*
dest
,
unsigned
int
*
dest_len
,
int
width
,
DWORD
format
,
SIZE
*
size
)
{
{
unsigned
int
orig_count
=
*
count
;
unsigned
int
i
=
0
;
unsigned
int
i
=
0
;
int
orig_count
=
*
count
;
int
num_fit
;
int
num_fit
;
*
dest_len
=
0
;
*
dest_len
=
0
;
...
@@ -600,25 +600,25 @@ static const WCHAR *read_line(HDC hdc, const WCHAR *str, int *count,
...
@@ -600,25 +600,25 @@ static const WCHAR *read_line(HDC hdc, const WCHAR *str, int *count,
}
}
static
INT
WINAPI
ID3DXFontImpl_DrawTextW
(
ID3DXFont
*
iface
,
ID3DXSprite
*
sprite
,
static
INT
WINAPI
ID3DXFontImpl_DrawTextW
(
ID3DXFont
*
iface
,
ID3DXSprite
*
sprite
,
const
WCHAR
*
string
,
INT
count
,
RECT
*
rect
,
DWORD
format
,
D3DCOLOR
color
)
const
WCHAR
*
string
,
INT
in_
count
,
RECT
*
rect
,
DWORD
format
,
D3DCOLOR
color
)
{
{
struct
d3dx_font
*
font
=
impl_from_ID3DXFont
(
iface
);
struct
d3dx_font
*
font
=
impl_from_ID3DXFont
(
iface
);
ID3DXSprite
*
target
=
sprite
;
ID3DXSprite
*
target
=
sprite
;
WCHAR
*
line
;
RECT
textrect
=
{
0
};
RECT
textrect
=
{
0
};
int
lh
,
x
,
y
,
width
;
int
lh
,
x
,
y
,
width
;
unsigned
int
count
;
int
max_width
=
0
;
int
max_width
=
0
;
WCHAR
*
line
;
int
ret
=
0
;
int
ret
=
0
;
SIZE
size
;
SIZE
size
;
TRACE
(
"iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x.
\n
"
,
TRACE
(
"iface %p, sprite %p, string %s,
in_
count %d, rect %s, format %#x, color 0x%08x.
\n
"
,
iface
,
sprite
,
debugstr_wn
(
string
,
count
),
count
,
wine_dbgstr_rect
(
rect
),
format
,
color
);
iface
,
sprite
,
debugstr_wn
(
string
,
in_count
),
in_
count
,
wine_dbgstr_rect
(
rect
),
format
,
color
);
if
(
!
string
)
if
(
!
string
)
return
0
;
return
0
;
if
(
count
<
0
)
count
=
in_count
<
0
?
lstrlenW
(
string
)
:
in_count
;
count
=
lstrlenW
(
string
);
if
(
!
count
)
if
(
!
count
)
return
0
;
return
0
;
...
...
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