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
68528519
Commit
68528519
authored
Mar 03, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Remove unused code for ChangeUniquenessValue.
parent
b282a937
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
31 deletions
+1
-31
ddraw_private.h
dlls/ddraw/ddraw_private.h
+0
-1
surface.c
dlls/ddraw/surface.c
+1
-30
No files found.
dlls/ddraw/ddraw_private.h
View file @
68528519
...
...
@@ -183,7 +183,6 @@ struct ddraw_surface
DDSURFACEDESC2
surface_desc
;
/* Misc things */
DWORD
uniqueness_value
;
UINT
mipmap_level
;
/* Clipper objects */
...
...
dlls/ddraw/surface.c
View file @
68528519
...
...
@@ -3886,35 +3886,10 @@ static HRESULT WINAPI ddraw_surface2_GetDDInterface(IDirectDrawSurface2 *iface,
return
ddraw_surface7_GetDDInterface
(
&
surface
->
IDirectDrawSurface7_iface
,
ddraw
);
}
/* This seems also windows implementation specific - I don't think WineD3D needs this */
static
HRESULT
WINAPI
ddraw_surface7_ChangeUniquenessValue
(
IDirectDrawSurface7
*
iface
)
{
struct
ddraw_surface
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
volatile
struct
ddraw_surface
*
vThis
=
This
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
/* A uniqueness value of 0 is apparently special.
* This needs to be checked.
* TODO: Write tests for this code and check if the volatile, interlocked stuff is really needed
*/
while
(
1
)
{
DWORD
old_uniqueness_value
=
vThis
->
uniqueness_value
;
DWORD
new_uniqueness_value
=
old_uniqueness_value
+
1
;
if
(
old_uniqueness_value
==
0
)
break
;
if
(
new_uniqueness_value
==
0
)
new_uniqueness_value
=
1
;
if
(
InterlockedCompareExchange
((
LONG
*
)
&
vThis
->
uniqueness_value
,
old_uniqueness_value
,
new_uniqueness_value
)
==
old_uniqueness_value
)
break
;
}
wined3d_mutex_unlock
();
return
DD_OK
;
}
...
...
@@ -3929,13 +3904,9 @@ static HRESULT WINAPI ddraw_surface4_ChangeUniquenessValue(IDirectDrawSurface4 *
static
HRESULT
WINAPI
ddraw_surface7_GetUniquenessValue
(
IDirectDrawSurface7
*
iface
,
DWORD
*
pValue
)
{
struct
ddraw_surface
*
surface
=
impl_from_IDirectDrawSurface7
(
iface
);
TRACE
(
"iface %p, value %p.
\n
"
,
iface
,
pValue
);
wined3d_mutex_lock
();
*
pValue
=
surface
->
uniqueness_value
;
wined3d_mutex_unlock
();
*
pValue
=
0
;
return
DD_OK
;
}
...
...
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