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
e817bc3f
Commit
e817bc3f
authored
Sep 26, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Sep 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Handle D3DXPT_VOID in get_float/bool/int().
parent
9be68462
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
31 deletions
+30
-31
util.c
dlls/d3dx9_36/util.c
+30
-31
No files found.
dlls/d3dx9_36/util.c
View file @
e817bc3f
...
...
@@ -271,63 +271,62 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r)
#undef WINE_D3DX_TO_STR
/* parameter type conversion helpers */
static
BOOL
get_bool
(
LPCVOID
data
)
static
BOOL
get_bool
(
D3DXPARAMETER_TYPE
type
,
LPCVOID
data
)
{
return
(
*
(
DWORD
*
)
data
)
!=
0
;
switch
(
type
)
{
case
D3DXPT_FLOAT
:
case
D3DXPT_INT
:
case
D3DXPT_BOOL
:
return
*
(
DWORD
*
)
data
!=
0
;
case
D3DXPT_VOID
:
return
*
(
BOOL
*
)
data
;
default:
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
type
));
return
FALSE
;
}
}
static
INT
get_int
(
D3DXPARAMETER_TYPE
type
,
LPCVOID
data
)
{
INT
i
;
switch
(
type
)
{
case
D3DXPT_FLOAT
:
i
=
*
(
FLOAT
*
)
data
;
break
;
return
*
(
FLOAT
*
)
data
;
case
D3DXPT_INT
:
i
=
*
(
INT
*
)
data
;
break
;
case
D3DXPT_VOID
:
return
*
(
INT
*
)
data
;
case
D3DXPT_BOOL
:
i
=
get_bool
(
data
);
break
;
return
get_bool
(
type
,
data
);
default:
i
=
0
;
FIXME
(
"Unhandled type %s. This should not happen!
\n
"
,
debug_d3dxparameter_type
(
type
));
break
;
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
type
));
return
0
;
}
return
i
;
}
static
FLOAT
get_float
(
D3DXPARAMETER_TYPE
type
,
LPCVOID
data
)
{
FLOAT
f
;
switch
(
type
)
{
case
D3DXPT_FLOAT
:
f
=
*
(
FLOAT
*
)
data
;
break
;
case
D3DXPT_VOID
:
return
*
(
FLOAT
*
)
data
;
case
D3DXPT_INT
:
f
=
*
(
INT
*
)
data
;
break
;
return
*
(
INT
*
)
data
;
case
D3DXPT_BOOL
:
f
=
get_bool
(
data
);
break
;
return
get_bool
(
type
,
data
);
default:
f
=
0
.
0
f
;
FIXME
(
"Unhandled type %s. This should not happen!
\n
"
,
debug_d3dxparameter_type
(
type
));
break
;
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
type
));
return
0
.
0
f
;
}
return
f
;
}
void
set_number
(
LPVOID
outdata
,
D3DXPARAMETER_TYPE
outtype
,
LPCVOID
indata
,
D3DXPARAMETER_TYPE
intype
)
...
...
@@ -347,7 +346,7 @@ void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DX
break
;
case
D3DXPT_BOOL
:
*
(
BOOL
*
)
outdata
=
get_bool
(
indata
);
*
(
BOOL
*
)
outdata
=
get_bool
(
in
type
,
in
data
);
break
;
case
D3DXPT_INT
:
...
...
@@ -355,8 +354,8 @@ void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DX
break
;
default:
FIXME
(
"Unhandled type %s.
This should not happen!
\n
"
,
debug_d3dxparameter_type
(
outtype
));
*
(
INT
*
)
outdata
=
0
;
FIXME
(
"Unhandled type %s.
\n
"
,
debug_d3dxparameter_type
(
outtype
));
*
(
DWORD
*
)
outdata
=
0
;
break
;
}
}
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