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
eb446e86
Commit
eb446e86
authored
Nov 25, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the pointer returned by map in wined3d_surface_getdc.
parent
038e45c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
surface.c
dlls/wined3d/surface.c
+6
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/surface.c
View file @
eb446e86
...
@@ -3324,11 +3324,10 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
...
@@ -3324,11 +3324,10 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
ERR
(
"Map failed, hr %#x.
\n
"
,
hr
);
ERR
(
"Map failed, hr %#x.
\n
"
,
hr
);
return
hr
;
return
hr
;
}
}
surface
->
getdc_map_mem
=
map
.
data
;
/* Sync the DIB with the PBO. This can't be done earlier because Map()
if
(
surface
->
dib
.
bitmap_data
!=
surface
->
getdc_map_mem
)
* activates the allocatedMemory. */
memcpy
(
surface
->
dib
.
bitmap_data
,
surface
->
getdc_map_mem
,
surface
->
resource
.
size
);
if
(
surface
->
flags
&
(
SFLAG_PBO
|
SFLAG_PIN_SYSMEM
))
memcpy
(
surface
->
dib
.
bitmap_data
,
surface
->
resource
.
allocatedMemory
,
surface
->
resource
.
size
);
if
(
surface
->
resource
.
format
->
id
==
WINED3DFMT_P8_UINT
if
(
surface
->
resource
.
format
->
id
==
WINED3DFMT_P8_UINT
||
surface
->
resource
.
format
->
id
==
WINED3DFMT_P8_UINT_A8_UNORM
)
||
surface
->
resource
.
format
->
id
==
WINED3DFMT_P8_UINT_A8_UNORM
)
...
@@ -3389,11 +3388,11 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
...
@@ -3389,11 +3388,11 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
return
WINEDDERR_NODC
;
return
WINEDDERR_NODC
;
}
}
/* Copy the contents of the DIB over to the PBO. */
if
(
surface
->
dib
.
bitmap_data
!=
surface
->
getdc_map_mem
)
if
((
surface
->
flags
&
(
SFLAG_PBO
|
SFLAG_PIN_SYSMEM
))
&&
surface
->
resource
.
allocatedMemory
)
memcpy
(
surface
->
getdc_map_mem
,
surface
->
dib
.
bitmap_data
,
surface
->
resource
.
size
);
memcpy
(
surface
->
resource
.
allocatedMemory
,
surface
->
dib
.
bitmap_data
,
surface
->
resource
.
size
);
/* We locked first, so unlock now. */
/* We locked first, so unlock now. */
surface
->
getdc_map_mem
=
NULL
;
wined3d_surface_unmap
(
surface
);
wined3d_surface_unmap
(
surface
);
surface
->
flags
&=
~
SFLAG_DCINUSE
;
surface
->
flags
&=
~
SFLAG_DCINUSE
;
...
...
dlls/wined3d/wined3d_private.h
View file @
eb446e86
...
@@ -2204,6 +2204,7 @@ struct wined3d_surface
...
@@ -2204,6 +2204,7 @@ struct wined3d_surface
/* For GetDC */
/* For GetDC */
struct
wined3d_surface_dib
dib
;
struct
wined3d_surface_dib
dib
;
HDC
hDC
;
HDC
hDC
;
void
*
getdc_map_mem
;
/* Color keys for DDraw */
/* Color keys for DDraw */
struct
wined3d_color_key
dst_blt_color_key
;
struct
wined3d_color_key
dst_blt_color_key
;
...
...
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