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
50c61959
Commit
50c61959
authored
Oct 02, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Just return the surface from wined3d_device_get_surface_from_dc().
parent
e4df956f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
ddraw.c
dlls/ddraw/ddraw.c
+1
-3
device.c
dlls/wined3d/device.c
+5
-7
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+1
-2
No files found.
dlls/ddraw/ddraw.c
View file @
50c61959
...
...
@@ -2422,14 +2422,12 @@ static HRESULT WINAPI ddraw7_GetSurfaceFromDC(IDirectDraw7 *iface, HDC hdc,
struct
ddraw
*
ddraw
=
impl_from_IDirectDraw7
(
iface
);
struct
wined3d_surface
*
wined3d_surface
;
struct
ddraw_surface
*
surface_impl
;
HRESULT
hr
;
TRACE
(
"iface %p, dc %p, surface %p.
\n
"
,
iface
,
hdc
,
Surface
);
if
(
!
Surface
)
return
E_INVALIDARG
;
hr
=
wined3d_device_get_surface_from_dc
(
ddraw
->
wined3d_device
,
hdc
,
&
wined3d_surface
);
if
(
FAILED
(
hr
))
if
(
!
(
wined3d_surface
=
wined3d_device_get_surface_from_dc
(
ddraw
->
wined3d_device
,
hdc
)))
{
TRACE
(
"No surface found for dc %p.
\n
"
,
hdc
);
*
Surface
=
NULL
;
...
...
dlls/wined3d/device.c
View file @
50c61959
...
...
@@ -5417,15 +5417,14 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
TRACE
(
"Resource released.
\n
"
);
}
HRESULT
CDECL
wined3d_device_get_surface_from_dc
(
const
struct
wined3d_device
*
device
,
HDC
dc
,
struct
wined3d_surface
**
surface
)
struct
wined3d_surface
*
CDECL
wined3d_device_get_surface_from_dc
(
const
struct
wined3d_device
*
device
,
HDC
dc
)
{
struct
wined3d_resource
*
resource
;
TRACE
(
"device %p, dc %p
, surface %p.
\n
"
,
device
,
dc
,
surface
);
TRACE
(
"device %p, dc %p
.
\n
"
,
device
,
dc
);
if
(
!
dc
)
return
WINED3DERR_INVALIDCA
LL
;
return
NU
LL
;
LIST_FOR_EACH_ENTRY
(
resource
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
...
...
@@ -5436,13 +5435,12 @@ HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *de
if
(
s
->
hDC
==
dc
)
{
TRACE
(
"Found surface %p for dc %p.
\n
"
,
s
,
dc
);
*
surface
=
s
;
return
WINED3D_OK
;
return
s
;
}
}
}
return
WINED3DERR_INVALIDCA
LL
;
return
NU
LL
;
}
HRESULT
device_init
(
struct
wined3d_device
*
device
,
struct
wined3d
*
wined3d
,
...
...
dlls/wined3d/wined3d.spec
View file @
50c61959
...
...
@@ -82,7 +82,7 @@
@ cdecl wined3d_device_get_software_vertex_processing(ptr)
@ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr)
@ cdecl wined3d_device_get_stream_source_freq(ptr long ptr)
@ cdecl wined3d_device_get_surface_from_dc(ptr ptr
ptr
)
@ cdecl wined3d_device_get_surface_from_dc(ptr ptr)
@ cdecl wined3d_device_get_swapchain(ptr long)
@ cdecl wined3d_device_get_swapchain_count(ptr)
@ cdecl wined3d_device_get_texture(ptr long)
...
...
include/wine/wined3d.h
View file @
50c61959
...
...
@@ -2152,8 +2152,7 @@ HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *de
UINT
stream_idx
,
struct
wined3d_buffer
**
buffer
,
UINT
*
offset
,
UINT
*
stride
);
HRESULT
__cdecl
wined3d_device_get_stream_source_freq
(
const
struct
wined3d_device
*
device
,
UINT
stream_idx
,
UINT
*
divider
);
HRESULT
__cdecl
wined3d_device_get_surface_from_dc
(
const
struct
wined3d_device
*
device
,
HDC
dc
,
struct
wined3d_surface
**
surface
);
struct
wined3d_surface
*
__cdecl
wined3d_device_get_surface_from_dc
(
const
struct
wined3d_device
*
device
,
HDC
dc
);
struct
wined3d_swapchain
*
__cdecl
wined3d_device_get_swapchain
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
);
UINT
__cdecl
wined3d_device_get_swapchain_count
(
const
struct
wined3d_device
*
device
);
...
...
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