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
b7ed6df2
Commit
b7ed6df2
authored
May 09, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
May 09, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Number of surface Lock/Unlocks must NOT match, so do NOT use it for
reference counting.
parent
f561aadf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
main.c
dlls/ddraw/dsurface/main.c
+9
-5
x11.c
dlls/ddraw/dsurface/x11.c
+4
-3
No files found.
dlls/ddraw/dsurface/main.c
View file @
b7ed6df2
...
...
@@ -31,8 +31,13 @@ HRESULT WINAPI IDirectDrawSurface4Impl_Lock(
LPDIRECTDRAWSURFACE4
iface
,
LPRECT
lprect
,
LPDDSURFACEDESC
lpddsd
,
DWORD
flags
,
HANDLE
hnd
)
{
ICOM_THIS
(
IDirectDrawSurface4Impl
,
iface
);
TRACE
(
"(%p)->Lock(%p,%p,%08lx,%08lx)
\n
"
,
This
,
lprect
,
lpddsd
,
flags
,(
DWORD
)
hnd
);
/* DO NOT AddRef the surface! Lock/Unlock must not come in matched pairs
* -Marcus Meissner 20000509
*/
if
(
flags
&
~
(
DDLOCK_WAIT
|
DDLOCK_READONLY
|
DDLOCK_WRITEONLY
))
WARN
(
"(%p)->Lock(%p,%p,%08lx,%08lx)
\n
"
,
This
,
lprect
,
lpddsd
,
flags
,(
DWORD
)
hnd
);
...
...
@@ -68,6 +73,10 @@ HRESULT WINAPI IDirectDrawSurface4Impl_Unlock(
LPDIRECTDRAWSURFACE4
iface
,
LPVOID
surface
)
{
ICOM_THIS
(
IDirectDrawSurface4Impl
,
iface
);
/* DO NOT Release the surface! Lock/Unlock MUST NOT come in matched pairs
* Marcus Meissner 20000509
*/
TRACE
(
"(%p)->Unlock(%p)
\n
"
,
This
,
surface
);
return
DD_OK
;
}
...
...
@@ -170,11 +179,6 @@ HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
if
(
src
)
IDirectDrawSurface4_Lock
(
src
,
NULL
,
&
sdesc
,
0
,
0
);
IDirectDrawSurface4_Lock
(
iface
,
NULL
,
&
ddesc
,
0
,
0
);
if
(
src
&&
sdesc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
ERR
(
"blitting FROM a primary surface? Hello?
\n
"
);
if
(
!
(
ddesc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
))
ERR
(
"NOT blitting into a primary surface? Hello?
\n
"
);
if
(
TRACE_ON
(
ddraw
))
{
if
(
rdst
)
TRACE
(
"
\t
destrect :%dx%d-%dx%d
\n
"
,
rdst
->
left
,
rdst
->
top
,
rdst
->
right
,
rdst
->
bottom
);
if
(
rsrc
)
TRACE
(
"
\t
srcrect :%dx%d-%dx%d
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
...
...
dlls/ddraw/dsurface/x11.c
View file @
b7ed6df2
...
...
@@ -86,8 +86,8 @@ HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_Lock(
DSPRIVATE
(
This
);
DDPRIVATE
(
This
->
s
.
ddraw
);
IDirectDrawSurface4_AddRef
(
iface
);
/* DO NOT AddRef the surface! Lock/Unlock are NOT guaranteed to come in
* matched pairs! - Marcus Meissner 20000509 */
TRACE
(
"(%p)->Lock(%p,%p,%08lx,%08lx)
\n
"
,
This
,
lprect
,
lpddsd
,
flags
,(
DWORD
)
hnd
);
if
(
flags
&
~
(
DDLOCK_WAIT
|
DDLOCK_READONLY
|
DDLOCK_WRITEONLY
))
WARN
(
"(%p)->Lock(%p,%p,%08lx,%08lx)
\n
"
,
...
...
@@ -193,7 +193,8 @@ HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_Unlock(
TSXSetWindowColormap
(
display
,
ddpriv
->
drawable
,
dppriv
->
cm
);
}
}
IDirectDrawSurface4_Release
(
iface
);
/* DO NOT Release the surface! Lock/Unlock are NOT guaranteed to come in
* matched pairs! - Marcus Meissner 20000509 */
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