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
aaa593c0
Commit
aaa593c0
authored
Nov 24, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Nov 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Handle a special case in ID3DXBaseEffect::GetInt().
parent
fc09bc45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
effect.c
dlls/d3dx9_36/effect.c
+27
-4
No files found.
dlls/d3dx9_36/effect.c
View file @
aaa593c0
...
...
@@ -26,6 +26,9 @@
#include "wingdi.h"
#include "d3dx9_36_private.h"
/* Constants for special INT/FLOAT conversation */
#define INT_FLOAT_MULTI 255.0f
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
static
const
struct
ID3DXEffectVtbl
ID3DXEffect_Vtbl
;
...
...
@@ -1703,11 +1706,31 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetInt(ID3DXBaseEffect *iface, D3DXHAN
TRACE
(
"iface %p, parameter %p, n %p
\n
"
,
This
,
parameter
,
n
);
if
(
n
&&
param
&&
!
param
->
element_count
&&
param
->
columns
==
1
&&
param
->
rows
==
1
)
if
(
n
&&
param
&&
!
param
->
element_count
)
{
*
n
=
get_int
(
param
->
type
,
param
->
data
);
TRACE
(
"Returning %i
\n
"
,
*
n
);
return
D3D_OK
;
if
(
param
->
columns
==
1
&&
param
->
rows
==
1
)
{
*
n
=
get_int
(
param
->
type
,
param
->
data
);
TRACE
(
"Returning %i
\n
"
,
*
n
);
return
D3D_OK
;
}
if
(
param
->
type
==
D3DXPT_FLOAT
&&
((
param
->
class
==
D3DXPC_VECTOR
&&
param
->
columns
!=
2
)
||
(
param
->
class
==
D3DXPC_MATRIX_ROWS
&&
param
->
rows
!=
2
&&
param
->
columns
==
1
)))
{
/* all components (3,4) are clamped (0,255) and put in the INT */
*
n
=
(
INT
)(
min
(
max
(
0
.
0
f
,
*
((
FLOAT
*
)
param
->
data
+
2
)),
1
.
0
f
)
*
INT_FLOAT_MULTI
);
*
n
+=
((
INT
)(
min
(
max
(
0
.
0
f
,
*
((
FLOAT
*
)
param
->
data
+
1
)),
1
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
8
;
*
n
+=
((
INT
)(
min
(
max
(
0
.
0
f
,
*
((
FLOAT
*
)
param
->
data
+
0
)),
1
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
16
;
if
(
param
->
columns
*
param
->
rows
>
3
)
{
*
n
+=
((
INT
)(
min
(
max
(
0
.
0
f
,
*
((
FLOAT
*
)
param
->
data
+
3
)),
1
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
24
;
}
TRACE
(
"Returning %i
\n
"
,
*
n
);
return
D3D_OK
;
}
}
WARN
(
"Invalid argument specified
\n
"
);
...
...
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