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
b44b2c2d
Commit
b44b2c2d
authored
Mar 28, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Just print a message if loading the logo bitmap failed.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
74492d78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
33 deletions
+18
-33
device.c
dlls/wined3d/device.c
+18
-33
No files found.
dlls/wined3d/device.c
View file @
b44b2c2d
...
...
@@ -35,6 +35,7 @@
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
WINE_DECLARE_DEBUG_CHANNEL
(
winediag
);
/* Define the default light parameters as specified by MSDN. */
const
struct
wined3d_light
WINED3D_default_light
=
...
...
@@ -547,23 +548,16 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
HRESULT
hr
;
HDC
dcb
=
NULL
,
dcs
=
NULL
;
hbm
=
LoadImageA
(
NULL
,
filename
,
IMAGE_BITMAP
,
0
,
0
,
LR_LOADFROMFILE
|
LR_CREATEDIBSECTION
);
if
(
hbm
)
if
(
!
(
hbm
=
LoadImageA
(
NULL
,
filename
,
IMAGE_BITMAP
,
0
,
0
,
LR_LOADFROMFILE
|
LR_CREATEDIBSECTION
)))
{
GetObjectA
(
hbm
,
sizeof
(
BITMAP
),
&
bm
);
dcb
=
CreateCompatibleDC
(
NULL
);
if
(
!
dcb
)
goto
out
;
SelectObject
(
dcb
,
hbm
);
}
else
{
/* Create a 32x32 white surface to indicate that wined3d is used, but the specified image
* couldn't be loaded
*/
memset
(
&
bm
,
0
,
sizeof
(
bm
));
bm
.
bmWidth
=
32
;
bm
.
bmHeight
=
32
;
ERR_
(
winediag
)(
"Failed to load logo %s.
\n
"
,
wine_dbgstr_a
(
filename
));
return
;
}
GetObjectA
(
hbm
,
sizeof
(
BITMAP
),
&
bm
);
if
(
!
(
dcb
=
CreateCompatibleDC
(
NULL
)))
goto
out
;
SelectObject
(
dcb
,
hbm
);
desc
.
resource_type
=
WINED3D_RTYPE_TEXTURE_2D
;
desc
.
format
=
WINED3DFMT_B5G6R5_UNORM
;
...
...
@@ -583,27 +577,18 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
goto
out
;
}
if
(
dcb
)
if
(
FAILED
(
hr
=
wined3d_texture_get_dc
(
device
->
logo_texture
,
0
,
&
dcs
))
)
{
if
(
FAILED
(
hr
=
wined3d_texture_get_dc
(
device
->
logo_texture
,
0
,
&
dcs
)))
goto
out
;
BitBlt
(
dcs
,
0
,
0
,
bm
.
bmWidth
,
bm
.
bmHeight
,
dcb
,
0
,
0
,
SRCCOPY
);
wined3d_texture_release_dc
(
device
->
logo_texture
,
0
,
dcs
);
color_key
.
color_space_low_value
=
0
;
color_key
.
color_space_high_value
=
0
;
wined3d_texture_set_color_key
(
device
->
logo_texture
,
WINED3D_CKEY_SRC_BLT
,
&
color_key
);
wined3d_texture_decref
(
device
->
logo_texture
);
device
->
logo_texture
=
NULL
;
goto
out
;
}
else
{
const
struct
wined3d_color
c
=
{
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
1
.
0
f
};
const
RECT
rect
=
{
0
,
0
,
desc
.
width
,
desc
.
height
};
struct
wined3d_surface
*
surface
;
BitBlt
(
dcs
,
0
,
0
,
bm
.
bmWidth
,
bm
.
bmHeight
,
dcb
,
0
,
0
,
SRCCOPY
);
wined3d_texture_release_dc
(
device
->
logo_texture
,
0
,
dcs
);
/* Fill the surface with a white color to show that wined3d is there */
surface
=
device
->
logo_texture
->
sub_resources
[
0
].
u
.
surface
;
surface_color_fill
(
surface
,
&
rect
,
&
c
);
}
color_key
.
color_space_low_value
=
0
;
color_key
.
color_space_high_value
=
0
;
wined3d_texture_set_color_key
(
device
->
logo_texture
,
WINED3D_CKEY_SRC_BLT
,
&
color_key
);
out:
if
(
dcb
)
DeleteDC
(
dcb
);
...
...
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