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
d16402b1
Commit
d16402b1
authored
Aug 28, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Simplify D3DXLoadSurfaceFromResourceA().
parent
ac54753e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
surface.c
dlls/d3dx9_36/surface.c
+11
-16
No files found.
dlls/d3dx9_36/surface.c
View file @
d16402b1
...
...
@@ -1240,7 +1240,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface,
const
PALETTEENTRY
*
dst_palette
,
const
RECT
*
dst_rect
,
HMODULE
src_module
,
const
char
*
resource
,
const
RECT
*
src_rect
,
DWORD
filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
src_info
)
{
HRSRC
hResInfo
;
UINT
data_size
;
HRSRC
resinfo
;
void
*
data
;
TRACE
(
"dst_surface %p, dst_palette %p, dst_rect %s, src_module %p, resource %s, "
"src_rect %s, filter %#x, color_key 0x%08x, src_info %p.
\n
"
,
...
...
@@ -1250,23 +1252,16 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface,
if
(
!
dst_surface
)
return
D3DERR_INVALIDCALL
;
hResInfo
=
FindResourceA
(
src_module
,
resource
,
(
const
char
*
)
RT_RCDATA
);
if
(
!
hResInfo
)
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
hResInfo
=
FindResourceA
(
src_module
,
resource
,
(
const
char
*
)
RT_BITMAP
);
if
(
hResInfo
)
{
UINT
data_size
;
void
*
data
;
if
(
FAILED
(
load_resource_into_memory
(
src_module
,
hResInfo
,
&
data
,
&
data_size
)))
return
D3DXERR_INVALIDDATA
;
if
(
!
(
resinfo
=
FindResourceA
(
src_module
,
resource
,
(
const
char
*
)
RT_RCDATA
))
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
&&
!
(
resinfo
=
FindResourceA
(
src_module
,
resource
,
(
const
char
*
)
RT_BITMAP
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXLoadSurfaceFromFileInMemory
(
dst_surface
,
dst_palette
,
dst_rect
,
data
,
data_size
,
src_rect
,
filter
,
color_key
,
src_info
);
}
if
(
FAILED
(
load_resource_into_memory
(
src_module
,
resinfo
,
&
data
,
&
data_size
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
return
D3DXLoadSurfaceFromFileInMemory
(
dst_surface
,
dst_palette
,
dst_rect
,
data
,
data_size
,
src_rect
,
filter
,
color_key
,
src_info
);
}
HRESULT
WINAPI
D3DXLoadSurfaceFromResourceW
(
IDirect3DSurface9
*
dst_surface
,
...
...
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