Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
46b26be5
Commit
46b26be5
authored
Jan 15, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DirectDraw: port to UNICODE friendly APIs
This would need more testing and close look
parent
59f746f6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+13
-11
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+3
-3
No files found.
modules/video_output/msw/directx.c
View file @
46b26be5
...
...
@@ -52,7 +52,7 @@
#include "common.h"
#ifdef UNICODE
#
error "Unicode mode not suppor
ted"
#
warning "Unicode mode not tes
ted"
#endif
/*****************************************************************************
...
...
@@ -446,12 +446,14 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
if
(
!
hmon
)
return
TRUE
;
msg_Dbg
(
vd
,
"DirectXEnumCallback: %s, %s"
,
desc
,
drivername
);
char
*
psz_drivername
=
FromT
(
drivername
);
msg_Dbg
(
vd
,
"DirectXEnumCallback: %s, %s"
,
FromT
(
desc
),
psz_drivername
);
char
*
device
=
var_GetString
(
vd
,
"directx-device"
);
/* Check for forced device */
if
(
device
&&
*
device
&&
!
strcmp
(
drivername
,
device
))
{
if
(
device
&&
*
device
&&
!
strcmp
(
psz_
drivername
,
device
))
{
MONITORINFO
monitor_info
;
monitor_info
.
cbSize
=
sizeof
(
MONITORINFO
);
...
...
@@ -475,7 +477,7 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
free
(
device
);
if
(
hmon
==
sys
->
hmonitor
)
{
msg_Dbg
(
vd
,
"selecting %s, %s"
,
desc
,
drivername
);
msg_Dbg
(
vd
,
"selecting %s, %s"
,
FromT
(
desc
),
psz_
drivername
);
free
(
sys
->
display_driver
);
sys
->
display_driver
=
malloc
(
sizeof
(
*
guid
));
...
...
@@ -564,16 +566,16 @@ static int DirectXOpenDDraw(vout_display_t *vd)
/* */
HRESULT
(
WINAPI
*
OurDirectDrawCreate
)(
GUID
*
,
LPDIRECTDRAW
*
,
IUnknown
*
);
OurDirectDrawCreate
=
(
void
*
)
GetProcAddress
(
sys
->
hddraw_dll
,
_T
(
"DirectDrawCreate"
)
);
(
void
*
)
GetProcAddress
(
sys
->
hddraw_dll
,
"DirectDrawCreate"
);
if
(
!
OurDirectDrawCreate
)
{
msg_Err
(
vd
,
"DirectXInitDDraw failed GetProcAddress"
);
return
VLC_EGENERIC
;
}
/* */
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
A
,
LPVOID
,
DWORD
);
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
,
LPVOID
,
DWORD
);
OurDirectDrawEnumerateEx
=
(
void
*
)
GetProcAddress
(
sys
->
hddraw_dll
,
_T
(
"DirectDrawEnumerateExA"
)
);
(
void
*
)
GetProcAddress
(
sys
->
hddraw_dll
,
"DirectDrawEnumerateEx"
);
if
(
OurDirectDrawEnumerateEx
)
{
char
*
device
=
var_GetString
(
vd
,
"directx-device"
);
...
...
@@ -1425,8 +1427,8 @@ static BOOL WINAPI DirectXEnumCallback2(GUID *guid, LPTSTR desc,
ctx
->
descs
=
xrealloc
(
ctx
->
descs
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
/* TODO? Unicode APIs */
ctx
->
values
[
ctx
->
count
]
=
From
ANSI
(
drivername
);
ctx
->
descs
[
ctx
->
count
]
=
From
ANSI
(
drivername
);
ctx
->
values
[
ctx
->
count
]
=
From
T
(
drivername
);
ctx
->
descs
[
ctx
->
count
]
=
From
T
(
drivername
);
ctx
->
count
++
;
return
TRUE
;
/* Keep enumerating */
...
...
@@ -1448,9 +1450,9 @@ static int FindDevicesCallback(vlc_object_t *object, const char *name,
if
(
hddraw_dll
!=
NULL
)
{
/* Enumerate displays */
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
A
,
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
,
LPVOID
,
DWORD
)
=
(
void
*
)
GetProcAddress
(
hddraw_dll
,
_T
(
"DirectDrawEnumerateExA"
)
);
(
void
*
)
GetProcAddress
(
hddraw_dll
,
"DirectDrawEnumerateEx"
);
if
(
OurDirectDrawEnumerateEx
!=
NULL
)
OurDirectDrawEnumerateEx
(
DirectXEnumCallback2
,
&
ctx
,
DDENUM_ATTACHEDSECONDARYDEVICES
);
...
...
modules/video_output/msw/events.c
View file @
46b26be5
...
...
@@ -499,7 +499,7 @@ static int DirectXCreateWindow( event_thread_t *p_event )
HMENU
hMenu
;
RECT
rect_window
;
WNDCLASS
wc
;
/* window class components */
char
vlc_path
[
MAX_PATH
+
1
];
TCHAR
vlc_path
[
MAX_PATH
+
1
];
int
i_style
,
i_stylex
;
msg_Dbg
(
vd
,
"DirectXCreateWindow"
);
...
...
@@ -1043,9 +1043,9 @@ event_thread_t *EventThreadCreate( vout_display_t *vd)
p_event
->
source
=
vd
->
source
;
vout_display_PlacePicture
(
&
p_event
->
place
,
&
vd
->
source
,
vd
->
cfg
,
false
);
_snprintf
(
p_event
->
class_main
,
sizeof
(
p_event
->
class_main
)
/
sizeof
(
*
p_event
->
class_main
),
_sn
t
printf
(
p_event
->
class_main
,
sizeof
(
p_event
->
class_main
)
/
sizeof
(
*
p_event
->
class_main
),
_T
(
"VLC MSW %p"
),
p_event
);
_snprintf
(
p_event
->
class_video
,
sizeof
(
p_event
->
class_video
)
/
sizeof
(
*
p_event
->
class_video
),
_sn
t
printf
(
p_event
->
class_video
,
sizeof
(
p_event
->
class_video
)
/
sizeof
(
*
p_event
->
class_video
),
_T
(
"VLC MSW video %p"
),
p_event
);
return
p_event
;
}
...
...
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