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
4b56eae0
Commit
4b56eae0
authored
Aug 29, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Simplify D3DXCreateTextureFromResourceExA().
parent
805fc641
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
21 deletions
+14
-21
texture.c
dlls/d3dx9_36/texture.c
+14
-21
No files found.
dlls/d3dx9_36/texture.c
View file @
4b56eae0
...
...
@@ -785,34 +785,27 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device,
PALETTEENTRY
*
palette
,
struct
IDirect3DTexture9
**
texture
)
{
HRSRC
resinfo
;
void
*
buffer
;
DWORD
size
;
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_a
(
resource
));
TRACE
(
"device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, "
"pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.
\n
"
,
device
,
srcmodule
,
debugstr_a
(
resource
),
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
if
(
!
device
||
!
texture
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
const
char
*
)
RT_RCDATA
);
if
(
!
resinfo
)
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
const
char
*
)
RT_BITMAP
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
hr
;
DWORD
size
;
hr
=
load_resource_into_memory
(
srcmodule
,
resinfo
,
&
buffer
,
&
size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
if
(
!
(
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
const
char
*
)
RT_RCDATA
))
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
&&
!
(
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
const
char
*
)
RT_BITMAP
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXCreateTextureFromFileInMemoryEx
(
device
,
buffer
,
size
,
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
}
if
(
FAILED
(
load_resource_into_memory
(
srcmodule
,
resinfo
,
&
buffer
,
&
size
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
return
D3DXCreateTextureFromFileInMemoryEx
(
device
,
buffer
,
size
,
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
}
HRESULT
WINAPI
D3DXCreateTextureFromResourceExW
(
struct
IDirect3DDevice9
*
device
,
HMODULE
srcmodule
,
...
...
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