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
792e2ee2
Commit
792e2ee2
authored
Apr 22, 2013
by
Christian Costa
Committed by
Alexandre Julliard
Apr 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Add DIB file support to D3DXLoadSurfaceFromFileInMemory.
parent
4653b839
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
surface.c
dlls/d3dx9_36/surface.c
+6
-0
surface.c
dlls/d3dx9_36/tests/surface.c
+0
-2
texture.c
dlls/d3dx9_36/tests/texture.c
+1
-2
No files found.
dlls/d3dx9_36/surface.c
View file @
792e2ee2
...
@@ -1073,6 +1073,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface,
...
@@ -1073,6 +1073,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface,
return
hr
;
return
hr
;
}
}
if
(
imginfo
.
ImageFileFormat
==
D3DXIFF_DIB
)
convert_dib_to_bmp
((
void
**
)
&
pSrcData
,
&
SrcDataSize
);
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
FAILED
(
CoCreateInstance
(
&
CLSID_WICImagingFactory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICImagingFactory
,
(
void
**
)
&
factory
)))
if
(
FAILED
(
CoCreateInstance
(
&
CLSID_WICImagingFactory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICImagingFactory
,
(
void
**
)
&
factory
)))
...
@@ -1135,6 +1138,9 @@ cleanup_bmp:
...
@@ -1135,6 +1138,9 @@ cleanup_bmp:
cleanup_err:
cleanup_err:
CoUninitialize
();
CoUninitialize
();
if
(
imginfo
.
ImageFileFormat
==
D3DXIFF_DIB
)
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
pSrcData
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
...
...
dlls/d3dx9_36/tests/surface.c
View file @
792e2ee2
...
@@ -623,10 +623,8 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
...
@@ -623,10 +623,8 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
/* D3DXLoadSurfaceFromResource */
/* D3DXLoadSurfaceFromResource */
todo_wine
{
hr
=
D3DXLoadSurfaceFromResourceA
(
surf
,
NULL
,
NULL
,
NULL
,
MAKEINTRESOURCE
(
IDB_BITMAP_1x1
),
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
hr
=
D3DXLoadSurfaceFromResourceA
(
surf
,
NULL
,
NULL
,
NULL
,
MAKEINTRESOURCE
(
IDB_BITMAP_1x1
),
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
}
hr
=
D3DXLoadSurfaceFromResourceA
(
surf
,
NULL
,
NULL
,
NULL
,
MAKEINTRESOURCE
(
IDD_BITMAPDATA_1x1
),
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
hr
=
D3DXLoadSurfaceFromResourceA
(
surf
,
NULL
,
NULL
,
NULL
,
MAKEINTRESOURCE
(
IDD_BITMAPDATA_1x1
),
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
...
...
dlls/d3dx9_36/tests/texture.c
View file @
792e2ee2
...
@@ -728,11 +728,10 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
...
@@ -728,11 +728,10 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
}
}
/* D3DXCreateTextureFromResource */
/* D3DXCreateTextureFromResource */
todo_wine
{
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
&
texture
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
}
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
texture
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
...
...
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