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
55f3c576
Commit
55f3c576
authored
Nov 18, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove the effetively unused "state" field from the device.
parent
135e6cea
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
102 deletions
+11
-102
device.c
dlls/d3d8/device.c
+3
-9
device.c
dlls/d3d9/device.c
+7
-10
ddraw.c
dlls/ddraw/ddraw.c
+1
-46
device.c
dlls/wined3d/device.c
+0
-32
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-3
wined3d.idl
include/wine/wined3d.idl
+0
-2
No files found.
dlls/d3d8/device.c
View file @
55f3c576
...
...
@@ -334,17 +334,11 @@ static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) {
}
/* IDirect3DDevice Interface follow: */
static
HRESULT
WINAPI
IDirect3DDevice8Impl_TestCooperativeLevel
(
LPDIRECT3DDEVICE8
iface
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
HRESULT
hr
;
static
HRESULT
WINAPI
IDirect3DDevice8Impl_TestCooperativeLevel
(
IDirect3DDevice8
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_TestCooperativeLevel
(
This
->
WineD3DDevice
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
UINT
WINAPI
IDirect3DDevice8Impl_GetAvailableTextureMem
(
LPDIRECT3DDEVICE8
iface
)
{
...
...
dlls/d3d9/device.c
View file @
55f3c576
...
...
@@ -280,22 +280,19 @@ static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(LPDIRECT3DDEV
}
/* IDirect3DDevice Interface follow: */
static
HRESULT
WINAPI
IDirect3DDevice9Impl_TestCooperativeLevel
(
LPDIRECT3DDEVICE9EX
iface
)
{
static
HRESULT
WINAPI
IDirect3DDevice9Impl_TestCooperativeLevel
(
IDirect3DDevice9Ex
*
iface
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_TestCooperativeLevel
(
This
->
WineD3DDevice
);
wined3d_mutex_unlock
();
if
(
hr
==
WINED3D_OK
&&
This
->
notreset
)
{
TRACE
(
"D3D9 Device is marked not reset
\n
"
);
hr
=
D3DERR_DEVICENOTRESET
;
if
(
This
->
notreset
)
{
TRACE
(
"D3D9 device is marked not reset.
\n
"
);
return
D3DERR_DEVICENOTRESET
;
}
return
hr
;
return
D3D_OK
;
}
static
UINT
WINAPI
IDirect3DDevice9Impl_GetAvailableTextureMem
(
LPDIRECT3DDEVICE9EX
iface
)
{
...
...
dlls/ddraw/ddraw.c
View file @
55f3c576
...
...
@@ -1187,53 +1187,8 @@ static HRESULT WINAPI IDirectDrawImpl_GetScanLine(IDirectDraw7 *iface, DWORD *Sc
static
HRESULT
WINAPI
IDirectDrawImpl_TestCooperativeLevel
(
IDirectDraw7
*
iface
)
{
IDirectDrawImpl
*
This
=
(
IDirectDrawImpl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
This
);
EnterCriticalSection
(
&
ddraw_cs
);
/* Description from MSDN:
* For fullscreen apps return DDERR_NOEXCLUSIVEMODE if the user switched
* away from the app with e.g. alt-tab. Windowed apps receive
* DDERR_EXCLUSIVEMODEALREADYSET if another application created a
* DirectDraw object in exclusive mode. DDERR_WRONGMODE is returned,
* when the video mode has changed
*/
hr
=
IWineD3DDevice_TestCooperativeLevel
(
This
->
wineD3DDevice
);
TRACE
(
"iface %p.
\n
"
,
iface
);
/* Fix the result value. These values are mapped from their
* d3d9 counterpart.
*/
switch
(
hr
)
{
case
WINED3DERR_DEVICELOST
:
if
(
This
->
cooperative_level
&
DDSCL_EXCLUSIVE
)
{
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_NOEXCLUSIVEMODE
;
}
else
{
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_EXCLUSIVEMODEALREADYSET
;
}
case
WINED3DERR_DEVICENOTRESET
:
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
case
WINED3D_OK
:
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
case
WINED3DERR_DRIVERINTERNALERROR
:
default:
ERR
(
"(%p) Unexpected return value %08x from wineD3D, "
" returning DD_OK
\n
"
,
This
,
hr
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
}
...
...
dlls/wined3d/device.c
View file @
55f3c576
...
...
@@ -6494,31 +6494,6 @@ static BOOL WINAPI IWineD3DDeviceImpl_ShowCursor(IWineD3DDevice* iface, BOO
return
oldVisible
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_TestCooperativeLevel
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DResourceImpl
*
resource
;
TRACE
(
"(%p) : state (%u)
\n
"
,
This
,
This
->
state
);
/* TODO: Implement wrapping of the WndProc so that mimimize and maximize can be monitored and the states adjusted. */
switch
(
This
->
state
)
{
case
WINED3D_OK
:
return
WINED3D_OK
;
case
WINED3DERR_DEVICELOST
:
{
LIST_FOR_EACH_ENTRY
(
resource
,
&
This
->
resources
,
IWineD3DResourceImpl
,
resource
.
resource_list_entry
)
{
if
(
resource
->
resource
.
pool
==
WINED3DPOOL_DEFAULT
)
return
WINED3DERR_DEVICENOTRESET
;
}
return
WINED3DERR_DEVICELOST
;
}
case
WINED3DERR_DRIVERINTERNALERROR
:
return
WINED3DERR_DRIVERINTERNALERROR
;
}
/* Unknown state */
return
WINED3DERR_DRIVERINTERNALERROR
;
}
static
HRESULT
WINAPI
evict_managed_resource
(
IWineD3DResource
*
resource
,
void
*
data
)
{
TRACE
(
"checking resource %p for eviction
\n
"
,
resource
);
if
(((
IWineD3DResourceImpl
*
)
resource
)
->
resource
.
pool
==
WINED3DPOOL_MANAGED
)
{
...
...
@@ -7154,7 +7129,6 @@ static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_SetCursorProperties
,
IWineD3DDeviceImpl_SetCursorPosition
,
IWineD3DDeviceImpl_ShowCursor
,
IWineD3DDeviceImpl_TestCooperativeLevel
,
/*** Getters and setters **/
IWineD3DDeviceImpl_SetClipPlane
,
IWineD3DDeviceImpl_GetClipPlane
,
...
...
@@ -7278,9 +7252,6 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
device
->
surface_alignment
=
wined3d
->
dxVersion
==
7
?
DDRAW_PITCH_ALIGNMENT
:
D3D8_PITCH_ALIGNMENT
;
device
->
posFixup
[
0
]
=
1
.
0
f
;
/* This is needed to get the x coord unmodified through a MAD. */
/* Set the state up as invalid until the device is fully created. */
device
->
state
=
WINED3DERR_DRIVERINTERNALERROR
;
/* Get the initial screen setup for ddraw. */
hr
=
IWineD3D_GetAdapterDisplayMode
((
IWineD3D
*
)
wined3d
,
adapter_idx
,
&
mode
);
if
(
FAILED
(
hr
))
...
...
@@ -7330,9 +7301,6 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
device
->
blitter
=
select_blit_implementation
(
adapter
,
device_type
);
/* Set the state of the device to valid. */
device
->
state
=
WINED3D_OK
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
55f3c576
...
...
@@ -1555,9 +1555,6 @@ struct IWineD3DDeviceImpl
/* Textures for when no other textures are mapped */
UINT
dummyTextureName
[
MAX_TEXTURES
];
/* Device state management */
HRESULT
state
;
/* DirectDraw stuff */
DWORD
ddraw_width
,
ddraw_height
;
WINED3DFORMAT
ddraw_format
;
...
...
include/wine/wined3d.idl
View file @
55f3c576
...
...
@@ -3076,8 +3076,6 @@ interface IWineD3DDevice : IWineD3DBase
BOOL
ShowCursor
(
[
in
]
BOOL
show
)
;
HRESULT
TestCooperativeLevel
(
)
;
HRESULT
SetClipPlane
(
[
in
]
DWORD
plane_idx
,
[
in
]
const
float
*
plane
...
...
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