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
b98cd5d9
Commit
b98cd5d9
authored
Jan 28, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the IWineD3DStateBlock typedef.
parent
4b109ff1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
device.c
dlls/wined3d/device.c
+17
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/device.c
View file @
b98cd5d9
...
...
@@ -1007,7 +1007,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateStateBlock
(
IWineD3DDevice
*
iface
,
WINED3DSTATEBLOCKTYPE
type
,
IWineD3DStateB
lock
**
stateblock
)
WINED3DSTATEBLOCKTYPE
type
,
struct
wined3d_stateb
lock
**
stateblock
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DStateBlockImpl
*
object
;
...
...
@@ -1029,7 +1029,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice *iface,
}
TRACE
(
"Created stateblock %p.
\n
"
,
object
);
*
stateblock
=
(
IWineD3DStateBlock
*
)
object
;
*
stateblock
=
object
;
return
WINED3D_OK
;
}
...
...
@@ -1886,7 +1886,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
if
(
!
This
->
adapter
->
opengl
)
return
WINED3DERR_INVALIDCALL
;
TRACE
(
"(%p) : Creating stateblock
\n
"
,
This
);
hr
=
IWineD3DDevice_CreateStateBlock
(
iface
,
WINED3DSBT_INIT
,
(
IWineD3DStateBlock
**
)
&
This
->
stateBlock
);
hr
=
IWineD3DDevice_CreateStateBlock
(
iface
,
WINED3DSBT_INIT
,
&
This
->
stateBlock
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create stateblock
\n
"
);
...
...
@@ -4637,9 +4637,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetDisplayMode(IWineD3DDevice *iface, U
* Stateblock related functions
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_BeginStateBlock
(
IWineD3DDevice
*
iface
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_BeginStateBlock
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DStateB
lock
*
stateblock
;
struct
wined3d_stateb
lock
*
stateblock
;
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -4658,24 +4659,29 @@ static HRESULT WINAPI IWineD3DDeviceImpl_BeginStateBlock(IWineD3DDevice *iface)
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_EndStateBlock
(
IWineD3DDevice
*
iface
,
IWineD3DStateBlock
**
ppStateBlock
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_EndStateBlock
(
IWineD3DDevice
*
iface
,
struct
wined3d_stateblock
**
stateblock
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DStateBlockImpl
*
object
=
This
->
updateStateBlock
;
TRACE
(
"iface %p, stateblock %p.
\n
"
,
iface
,
stateblock
);
if
(
!
This
->
isRecordingState
)
{
WARN
(
"(%p) not recording! returning error
\n
"
,
This
);
*
ppStateB
lock
=
NULL
;
*
stateb
lock
=
NULL
;
return
WINED3DERR_INVALIDCALL
;
}
stateblock_init_contained_states
(
object
);
*
ppStateBlock
=
(
IWineD3DStateBlock
*
)
object
;
*
stateblock
=
object
;
This
->
isRecordingState
=
FALSE
;
This
->
updateStateBlock
=
This
->
stateBlock
;
wined3d_stateblock_incref
(
This
->
updateStateBlock
);
/* IWineD3DStateBlock_AddRef(*ppStateBlock); don't need to do this, since we should really just release UpdateStateBlock first */
TRACE
(
"(%p) returning token (ptr to stateblock) of %p
\n
"
,
This
,
*
ppStateBlock
);
TRACE
(
"Returning stateblock %p.
\n
"
,
*
stateblock
);
return
WINED3D_OK
;
}
...
...
@@ -6521,7 +6527,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface,
}
/* Note: No parent needed for initial internal stateblock */
hr
=
IWineD3DDevice_CreateStateBlock
(
iface
,
WINED3DSBT_INIT
,
(
IWineD3DStateBlock
**
)
&
This
->
stateBlock
);
hr
=
IWineD3DDevice_CreateStateBlock
(
iface
,
WINED3DSBT_INIT
,
&
This
->
stateBlock
);
if
(
FAILED
(
hr
))
ERR
(
"Resetting the stateblock failed with error 0x%08x
\n
"
,
hr
);
else
TRACE
(
"Created stateblock %p
\n
"
,
This
->
stateBlock
);
This
->
updateStateBlock
=
This
->
stateBlock
;
...
...
dlls/wined3d/wined3d_private.h
View file @
b98cd5d9
...
...
@@ -53,7 +53,6 @@
#define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020
typedef
struct
wined3d_stateblock
IWineD3DStateBlockImpl
;
typedef
struct
wined3d_stateblock
IWineD3DStateBlock
;
typedef
struct
IWineD3DSurfaceImpl
IWineD3DSurfaceImpl
;
typedef
struct
IWineD3DPaletteImpl
IWineD3DPaletteImpl
;
typedef
struct
IWineD3DDeviceImpl
IWineD3DDeviceImpl
;
...
...
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