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
4778a5e2
Commit
4778a5e2
authored
Jan 07, 2013
by
Christian Costa
Committed by
Alexandre Julliard
Jan 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Add support for RT_BITMAP resource type since it is in DIB format D3DXIFF_DIB.
parent
26640c8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
51 deletions
+31
-51
surface.c
dlls/d3dx9_36/surface.c
+22
-28
surface.c
dlls/d3dx9_36/tests/surface.c
+3
-3
texture.c
dlls/d3dx9_36/texture.c
+6
-20
No files found.
dlls/d3dx9_36/surface.c
View file @
4778a5e2
...
...
@@ -878,8 +878,12 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3
TRACE
(
"(%p, %s, %p)
\n
"
,
module
,
debugstr_a
(
resource
),
info
);
resinfo
=
FindResourceA
(
module
,
resource
,
(
LPCSTR
)
RT_RCDATA
);
if
(
resinfo
)
{
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
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
hr
;
DWORD
size
;
...
...
@@ -889,11 +893,6 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3
return
D3DXGetImageInfoFromFileInMemory
(
buffer
,
size
,
info
);
}
resinfo
=
FindResourceA
(
module
,
resource
,
(
LPCSTR
)
RT_BITMAP
);
if
(
resinfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
...
...
@@ -903,8 +902,12 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D
TRACE
(
"(%p, %s, %p)
\n
"
,
module
,
debugstr_w
(
resource
),
info
);
resinfo
=
FindResourceW
(
module
,
resource
,
(
LPCWSTR
)
RT_RCDATA
);
if
(
resinfo
)
{
resinfo
=
FindResourceW
(
module
,
resource
,
(
const
WCHAR
*
)
RT_RCDATA
);
if
(
!
resinfo
)
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
resinfo
=
FindResourceW
(
module
,
resource
,
(
const
WCHAR
*
)
RT_BITMAP
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
hr
;
DWORD
size
;
...
...
@@ -914,11 +917,6 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D
return
D3DXGetImageInfoFromFileInMemory
(
buffer
,
size
,
info
);
}
resinfo
=
FindResourceW
(
module
,
resource
,
(
LPCWSTR
)
RT_BITMAP
);
if
(
resinfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
...
...
@@ -1138,7 +1136,11 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface,
if
(
!
dst_surface
)
return
D3DERR_INVALIDCALL
;
if
((
hResInfo
=
FindResourceA
(
src_module
,
resource
,
(
const
char
*
)
RT_RCDATA
)))
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
;
...
...
@@ -1150,12 +1152,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface,
data
,
data_size
,
src_rect
,
filter
,
color_key
,
src_info
);
}
if
((
hResInfo
=
FindResourceA
(
src_module
,
resource
,
(
const
char
*
)
RT_BITMAP
)))
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP.
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
...
...
@@ -1173,7 +1169,11 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface,
if
(
!
dst_surface
)
return
D3DERR_INVALIDCALL
;
if
((
hResInfo
=
FindResourceW
(
src_module
,
resource
,
(
const
WCHAR
*
)
RT_RCDATA
)))
hResInfo
=
FindResourceW
(
src_module
,
resource
,
(
const
WCHAR
*
)
RT_RCDATA
);
if
(
!
hResInfo
)
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
hResInfo
=
FindResourceW
(
src_module
,
resource
,
(
const
WCHAR
*
)
RT_BITMAP
);
if
(
hResInfo
)
{
UINT
data_size
;
void
*
data
;
...
...
@@ -1185,12 +1185,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface,
data
,
data_size
,
src_rect
,
filter
,
color_key
,
src_info
);
}
if
((
hResInfo
=
FindResourceW
(
src_module
,
resource
,
(
const
WCHAR
*
)
RT_BITMAP
)))
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP.
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
...
...
dlls/d3dx9_36/tests/surface.c
View file @
4778a5e2
...
...
@@ -380,11 +380,11 @@ static void test_D3DXGetImageInfo(void)
todo_wine
{
hr
=
D3DXGetImageInfoFromResourceA
(
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
&
info
);
/* RT_BITMAP */
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
hr
=
D3DXGetImageInfoFromResourceA
(
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
NULL
);
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
}
hr
=
D3DXGetImageInfoFromResourceA
(
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
NULL
);
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
hr
=
D3DXGetImageInfoFromResourceA
(
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
info
);
/* RT_RCDATA */
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
...
...
dlls/d3dx9_36/texture.c
View file @
4778a5e2
...
...
@@ -791,7 +791,9 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device,
if
(
!
device
||
!
texture
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
LPCSTR
)
RT_RCDATA
);
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
)
{
...
...
@@ -810,15 +812,6 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device,
srcinfo
,
palette
,
texture
);
}
/* Try loading the resource as bitmap data */
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
LPCSTR
)
RT_BITMAP
);
if
(
resinfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
...
...
@@ -834,7 +827,9 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device,
if
(
!
device
||
!
texture
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceW
(
srcmodule
,
resource
,
(
LPCWSTR
)
RT_RCDATA
);
resinfo
=
FindResourceW
(
srcmodule
,
resource
,
(
const
WCHAR
*
)
RT_RCDATA
);
if
(
!
resinfo
)
/* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */
resinfo
=
FindResourceW
(
srcmodule
,
resource
,
(
const
WCHAR
*
)
RT_BITMAP
);
if
(
resinfo
)
{
...
...
@@ -853,15 +848,6 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device,
srcinfo
,
palette
,
texture
);
}
/* Try loading the resource as bitmap data */
resinfo
=
FindResourceW
(
srcmodule
,
resource
,
(
LPCWSTR
)
RT_BITMAP
);
if
(
resinfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
...
...
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