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
fcf96b63
Commit
fcf96b63
authored
Oct 31, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Create the DIB section for DDSCAPS_OWNDC surfaces on initialization.
parent
7de4df9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
surface.c
dlls/ddraw/surface.c
+3
-0
surface.c
dlls/wined3d/surface.c
+11
-0
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/ddraw/surface.c
View file @
fcf96b63
...
...
@@ -5273,6 +5273,9 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
usage
|=
WINED3DUSAGE_DEPTHSTENCIL
;
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_OWNDC
)
usage
|=
WINED3DUSAGE_OWNDC
;
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_SYSTEMMEMORY
)
{
pool
=
WINED3DPOOL_SYSTEMMEM
;
...
...
dlls/wined3d/surface.c
View file @
fcf96b63
...
...
@@ -7305,6 +7305,17 @@ static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE sur
return
hr
;
}
/* Similar to lockable rendertargets above, creating the DIB section
* during surface initialization prevents the sysmem pointer from changing
* after a wined3d_surface_getdc() call. */
if
((
usage
&
WINED3DUSAGE_OWNDC
)
&&
!
surface
->
hDC
&&
SUCCEEDED
(
surface_create_dib_section
(
surface
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
surface
->
resource
.
heapMemory
);
surface
->
resource
.
heapMemory
=
NULL
;
surface
->
resource
.
allocatedMemory
=
surface
->
dib
.
bitmap_data
;
}
return
hr
;
}
...
...
include/wine/wined3d.h
View file @
fcf96b63
...
...
@@ -847,6 +847,7 @@ enum wined3d_sysval_semantic
#define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400
#define WINED3DUSAGE_DMAP 0x00004000
#define WINED3DUSAGE_MASK 0x00004fff
#define WINED3DUSAGE_OWNDC 0x20000000
#define WINED3DUSAGE_STATICDECL 0x40000000
#define WINED3DUSAGE_OVERLAY 0x80000000
...
...
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