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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
surface.c
dlls/d3dx9_36/surface.c
+8
-13
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
(
!
(
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
;
if
(
FAILED
(
load_resource_into_memory
(
src_module
,
hResI
nfo
,
&
data
,
&
data_size
)))
if
(
FAILED
(
load_resource_into_memory
(
src_module
,
resi
nfo
,
&
data
,
&
data_size
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXLoadSurfaceFromFileInMemory
(
dst_surface
,
dst_palette
,
dst_rect
,
data
,
data_size
,
src_rect
,
filter
,
color_key
,
src_info
);
}
return
D3DXERR_INVALIDDATA
;
}
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