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
aaff163a
Commit
aaff163a
authored
Aug 27, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Simplify D3DXGetImageInfoFromResourceA().
parent
b85c2a74
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 @
aaff163a
...
...
@@ -947,28 +947,23 @@ HRESULT WINAPI D3DXGetImageInfoFromFileW(LPCWSTR file, D3DXIMAGE_INFO *info)
* if we fail to load resource
*
*/
HRESULT
WINAPI
D3DXGetImageInfoFromResourceA
(
HMODULE
module
,
LPCSTR
resource
,
D3DXIMAGE_INFO
*
info
)
HRESULT
WINAPI
D3DXGetImageInfoFromResourceA
(
HMODULE
module
,
const
char
*
resource
,
D3DXIMAGE_INFO
*
info
)
{
HRSRC
resinfo
;
void
*
buffer
;
DWORD
size
;
TRACE
(
"(%p, %s, %p)
\n
"
,
module
,
debugstr_a
(
resource
),
info
);
resinfo
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_RCDATA
);
if
(
!
resinfo
)
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
resinfo
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_BITMAP
);
TRACE
(
"module %p, resource %s, info %p.
\n
"
,
module
,
debugstr_a
(
resource
),
info
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
hr
;
DWORD
size
;
if
(
!
(
resinfo
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_RCDATA
))
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
&&
!
(
resinfo
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_BITMAP
)))
return
D3DXERR_INVALIDDATA
;
hr
=
load_resource_into_memory
(
module
,
resinfo
,
&
buffer
,
&
size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
return
D3DXGetImageInfoFromFileInMemory
(
buffer
,
size
,
info
);
}
if
(
FAILED
(
load_resource_into_memory
(
module
,
resinfo
,
&
buffer
,
&
size
)))
return
D3DXERR_INVALIDDATA
;
return
D3DX
ERR_INVALIDDATA
;
return
D3DX
GetImageInfoFromFileInMemory
(
buffer
,
size
,
info
)
;
}
HRESULT
WINAPI
D3DXGetImageInfoFromResourceW
(
HMODULE
module
,
LPCWSTR
resource
,
D3DXIMAGE_INFO
*
info
)
...
...
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