Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
94f55cc6
Commit
94f55cc6
authored
Dec 02, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/directx: use a black overlay colorkey for 24 bits colour depth displays.
parent
935a2e8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+12
-8
No files found.
modules/video_output/directx/directx.c
View file @
94f55cc6
...
...
@@ -94,7 +94,7 @@ static void DirectXGetDDrawCaps ( vout_thread_t *p_vout );
static
int
DirectXLockSurface
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
static
int
DirectXUnlockSurface
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
static
DWORD
DirectXFindColorkey
(
vout_thread_t
*
p_vout
,
uint32_t
i_color
);
static
DWORD
DirectXFindColorkey
(
vout_thread_t
*
p_vout
,
uint32_t
*
i_color
);
void
SwitchWallpaperMode
(
vout_thread_t
*
,
vlc_bool_t
);
...
...
@@ -218,7 +218,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
GetMonitorInfo
=
NULL
;
if
(
(
huser32
=
GetModuleHandle
(
_T
(
"USER32"
)
)
)
)
{
p_vout
->
p_sys
->
MonitorFromWindow
=
p_vout
->
p_sys
->
MonitorFromWindow
=
(
HMONITOR
(
WINAPI
*
)(
HWND
,
DWORD
))
GetProcAddress
(
huser32
,
_T
(
"MonitorFromWindow"
)
);
p_vout
->
p_sys
->
GetMonitorInfo
=
#ifndef UNICODE
...
...
@@ -1017,7 +1017,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout )
/* Make sure the colorkey will be painted */
p_vout
->
p_sys
->
i_colorkey
=
1
;
p_vout
->
p_sys
->
i_rgb_colorkey
=
DirectXFindColorkey
(
p_vout
,
p_vout
->
p_sys
->
i_colorkey
);
DirectXFindColorkey
(
p_vout
,
&
p_vout
->
p_sys
->
i_colorkey
);
/* Create the actual brush */
SetClassLong
(
p_vout
->
p_sys
->
hvideownd
,
GCL_HBRBACKGROUND
,
...
...
@@ -1906,7 +1906,7 @@ static int DirectXUnlockSurface( vout_thread_t *p_vout, picture_t *p_pic )
/*****************************************************************************
* DirectXFindColorkey: Finds out the 32bits RGB pixel value of the colorkey
*****************************************************************************/
static
DWORD
DirectXFindColorkey
(
vout_thread_t
*
p_vout
,
uint32_t
i_color
)
static
DWORD
DirectXFindColorkey
(
vout_thread_t
*
p_vout
,
uint32_t
*
p
i_color
)
{
DDSURFACEDESC
ddsd
;
HRESULT
dxresult
;
...
...
@@ -1924,16 +1924,20 @@ static DWORD DirectXFindColorkey( vout_thread_t *p_vout, uint32_t i_color )
switch
(
ddsd
.
ddpfPixelFormat
.
dwRGBBitCount
)
{
case
4
:
*
(
uint8_t
*
)
ddsd
.
lpSurface
=
0x11
;
*
(
uint8_t
*
)
ddsd
.
lpSurface
=
*
pi_color
|
(
*
pi_color
<<
4
)
;
break
;
case
8
:
*
(
uint8_t
*
)
ddsd
.
lpSurface
=
0x01
;
*
(
uint8_t
*
)
ddsd
.
lpSurface
=
*
pi_color
;
break
;
case
15
:
case
16
:
*
(
uint16_t
*
)
ddsd
.
lpSurface
=
0x01
;
*
(
uint16_t
*
)
ddsd
.
lpSurface
=
*
pi_color
;
break
;
case
24
:
/* Seems to be problematic so we'll just put black as the colorkey */
*
pi_color
=
0
;
default:
*
(
uint32_t
*
)
ddsd
.
lpSurface
=
0x01
;
*
(
uint32_t
*
)
ddsd
.
lpSurface
=
*
pi_color
;
break
;
}
...
...
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