Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
94509fbd
Commit
94509fbd
authored
Nov 14, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Create a texture for the logo surface.
parent
9e44fadb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
16 deletions
+28
-16
device.c
dlls/wined3d/device.c
+23
-12
swapchain.c
dlls/wined3d/swapchain.c
+3
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/device.c
View file @
94509fbd
...
...
@@ -551,6 +551,8 @@ struct wined3d_swapchain * CDECL wined3d_device_get_swapchain(const struct wined
static
void
device_load_logo
(
struct
wined3d_device
*
device
,
const
char
*
filename
)
{
struct
wined3d_color_key
color_key
;
struct
wined3d_resource_desc
desc
;
struct
wined3d_surface
*
surface
;
HBITMAP
hbm
;
BITMAP
bm
;
HRESULT
hr
;
...
...
@@ -574,31 +576,40 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
bm
.
bmHeight
=
32
;
}
hr
=
wined3d_surface_create
(
device
,
bm
.
bmWidth
,
bm
.
bmHeight
,
WINED3DFMT_B5G6R5_UNORM
,
0
,
WINED3D_POOL_SYSTEM_MEM
,
WINED3D_MULTISAMPLE_NONE
,
0
,
WINED3D_SURFACE_MAPPABLE
,
NULL
,
&
wined3d_null_parent_ops
,
&
device
->
logo_surface
);
if
(
FAILED
(
hr
))
{
ERR
(
"Wine logo requested, but failed to create surface, hr %#x.
\n
"
,
hr
);
desc
.
resource_type
=
WINED3D_RTYPE_TEXTURE
;
desc
.
format
=
WINED3DFMT_B5G6R5_UNORM
;
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
0
;
desc
.
pool
=
WINED3D_POOL_SYSTEM_MEM
;
desc
.
width
=
bm
.
bmWidth
;
desc
.
height
=
bm
.
bmHeight
;
desc
.
depth
=
1
;
desc
.
size
=
0
;
if
(
FAILED
(
hr
=
wined3d_texture_create_2d
(
device
,
&
desc
,
1
,
WINED3D_SURFACE_MAPPABLE
,
NULL
,
&
wined3d_null_parent_ops
,
&
device
->
logo_texture
)))
{
ERR
(
"Wine logo requested, but failed to create texture, hr %#x.
\n
"
,
hr
);
goto
out
;
}
surface
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
device
->
logo_texture
,
0
));
if
(
dcb
)
{
if
(
FAILED
(
hr
=
wined3d_surface_getdc
(
device
->
logo_
surface
,
&
dcs
)))
if
(
FAILED
(
hr
=
wined3d_surface_getdc
(
surface
,
&
dcs
)))
goto
out
;
BitBlt
(
dcs
,
0
,
0
,
bm
.
bmWidth
,
bm
.
bmHeight
,
dcb
,
0
,
0
,
SRCCOPY
);
wined3d_surface_releasedc
(
device
->
logo_
surface
,
dcs
);
wined3d_surface_releasedc
(
surface
,
dcs
);
color_key
.
color_space_low_value
=
0
;
color_key
.
color_space_high_value
=
0
;
wined3d_surface_set_color_key
(
device
->
logo_
surface
,
WINEDDCKEY_SRCBLT
,
&
color_key
);
wined3d_surface_set_color_key
(
surface
,
WINEDDCKEY_SRCBLT
,
&
color_key
);
}
else
{
const
struct
wined3d_color
c
=
{
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
1
.
0
f
};
/* Fill the surface with a white color to show that wined3d is there */
wined3d_device_color_fill
(
device
,
device
->
logo_
surface
,
NULL
,
&
c
);
wined3d_device_color_fill
(
device
,
surface
,
NULL
,
&
c
);
}
out:
...
...
@@ -1014,8 +1025,8 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
if
(
device
->
logo_
surfac
e
)
wined3d_
surface_decref
(
device
->
logo_surfac
e
);
if
(
device
->
logo_
textur
e
)
wined3d_
texture_decref
(
device
->
logo_textur
e
);
state_unbind_resources
(
&
device
->
state
);
...
...
dlls/wined3d/swapchain.c
View file @
94509fbd
...
...
@@ -468,9 +468,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
NULL
,
WINED3D_TEXF_POINT
);
}
if
(
swapchain
->
device
->
logo_
surfac
e
)
if
(
swapchain
->
device
->
logo_
textur
e
)
{
struct
wined3d_surface
*
src_surface
=
swapchain
->
device
->
logo_surface
;
struct
wined3d_surface
*
src_surface
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
swapchain
->
device
->
logo_texture
,
0
));
RECT
rect
=
{
0
,
0
,
src_surface
->
resource
.
width
,
src_surface
->
resource
.
height
};
/* Blit the logo into the upper left corner of the drawable. */
...
...
dlls/wined3d/wined3d_private.h
View file @
94509fbd
...
...
@@ -1924,8 +1924,8 @@ struct wined3d_device
GLuint
cursorTexture
;
HCURSOR
hardwareCursor
;
/* The Wine logo
surfac
e */
struct
wined3d_
surface
*
logo_surfac
e
;
/* The Wine logo
textur
e */
struct
wined3d_
texture
*
logo_textur
e
;
/* Textures for when no other textures are mapped */
UINT
dummy_texture_2d
[
MAX_COMBINED_SAMPLERS
];
...
...
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