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
823d1fbc
Commit
823d1fbc
authored
Sep 05, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Sep 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Move bool cropping into helper function.
parent
65c651e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
effect.c
dlls/d3dx9_36/effect.c
+2
-3
util.c
dlls/d3dx9_36/util.c
+13
-7
No files found.
dlls/d3dx9_36/effect.c
View file @
823d1fbc
...
...
@@ -1649,8 +1649,6 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetBool(ID3DXBaseEffect *iface, D3DXHA
if
(
param
&&
!
param
->
element_count
&&
param
->
rows
==
1
&&
param
->
columns
==
1
)
{
/* crop input */
b
=
b
!=
0
;
set_number
(
param
->
data
,
param
->
type
,
&
b
,
D3DXPT_BOOL
);
return
D3D_OK
;
}
...
...
@@ -1699,7 +1697,8 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetBoolArray(ID3DXBaseEffect *iface, D
case
D3DXPC_MATRIX_ROWS
:
for
(
i
=
0
;
i
<
size
;
++
i
)
{
set_number
((
DWORD
*
)
param
->
data
+
i
,
param
->
type
,
&
b
[
i
],
D3DXPT_BOOL
);
/* don't crop the input, use D3DXPT_INT instead of D3DXPT_BOOL */
set_number
((
DWORD
*
)
param
->
data
+
i
,
param
->
type
,
&
b
[
i
],
D3DXPT_INT
);
}
return
D3D_OK
;
...
...
dlls/d3dx9_36/util.c
View file @
823d1fbc
...
...
@@ -271,6 +271,11 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r)
#undef WINE_D3DX_TO_STR
/* parameter type conversion helpers */
BOOL
get_bool
(
LPCVOID
data
)
{
return
(
*
(
DWORD
*
)
data
)
!=
0
;
}
INT
get_int
(
D3DXPARAMETER_TYPE
type
,
LPCVOID
data
)
{
INT
i
;
...
...
@@ -286,7 +291,7 @@ INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data)
break
;
case
D3DXPT_BOOL
:
i
=
*
(
BOOL
*
)
data
;
i
=
get_bool
(
data
)
;
break
;
default:
...
...
@@ -313,7 +318,7 @@ FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data)
break
;
case
D3DXPT_BOOL
:
f
=
*
(
BOOL
*
)
data
;
f
=
get_bool
(
data
)
;
break
;
default:
...
...
@@ -325,15 +330,16 @@ FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data)
return
f
;
}
BOOL
get_bool
(
LPCVOID
data
)
{
return
(
*
(
DWORD
*
)
data
)
!=
0
;
}
void
set_number
(
LPVOID
outdata
,
D3DXPARAMETER_TYPE
outtype
,
LPCVOID
indata
,
D3DXPARAMETER_TYPE
intype
)
{
TRACE
(
"Changing from type %s to type %s
\n
"
,
debug_d3dxparameter_type
(
intype
),
debug_d3dxparameter_type
(
outtype
));
if
(
outtype
==
intype
)
{
*
(
DWORD
*
)
outdata
=
*
(
DWORD
*
)
indata
;
return
;
}
switch
(
outtype
)
{
case
D3DXPT_FLOAT
:
...
...
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