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
69894cdb
Commit
69894cdb
authored
Jan 21, 2014
by
Felix Abecassis
Committed by
Jean-Baptiste Kempf
Jan 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DirectDraw: cleanup and document code after removing Unicode mode.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
7cbbe564
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+15
-18
No files found.
modules/video_output/msw/directx.c
View file @
69894cdb
...
@@ -52,15 +52,12 @@
...
@@ -52,15 +52,12 @@
#include "common.h"
#include "common.h"
#ifdef UNICODE
/* Unicode function "DirectDrawEnumerateExW" has been desactivated
# warning "Unicode mode not tested"
since in some cases this function fails and the callbacks are not
#endif
called. If the Unicode mode is restored, one should modify the
prototype of the callbacks and call the FromT conversion function.
#ifdef UNICODE
*/
# define DIRECTDRAWENUMERATEEX_NAME "DirectDrawEnumerateExA"
#define DIRECTDRAWENUMERATEEX_NAME "DirectDrawEnumerateExA"
#else
# define DIRECTDRAWENUMERATEEX_NAME "DirectDrawEnumerateExA"
#endif
/*****************************************************************************
/*****************************************************************************
* Module descriptor
* Module descriptor
...
@@ -438,8 +435,8 @@ static void DirectXClose(vout_display_t *vd)
...
@@ -438,8 +435,8 @@ static void DirectXClose(vout_display_t *vd)
}
}
/* */
/* */
static
BOOL
WINAPI
DirectXOpenDDrawCallback
(
GUID
*
guid
,
LP
T
STR
desc
,
static
BOOL
WINAPI
DirectXOpenDDrawCallback
(
GUID
*
guid
,
LPSTR
desc
,
LP
T
STR
drivername
,
VOID
*
context
,
LPSTR
drivername
,
VOID
*
context
,
HMONITOR
hmon
)
HMONITOR
hmon
)
{
{
vout_display_t
*
vd
=
context
;
vout_display_t
*
vd
=
context
;
...
@@ -453,8 +450,8 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
...
@@ -453,8 +450,8 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
if
(
!
hmon
)
if
(
!
hmon
)
return
TRUE
;
return
TRUE
;
char
*
psz_drivername
=
(
char
*
)
drivername
;
char
*
psz_drivername
=
drivername
;
char
*
psz_desc
=
(
char
*
)
desc
;
char
*
psz_desc
=
desc
;
msg_Dbg
(
vd
,
"DirectXEnumCallback: %s, %s"
,
psz_desc
,
psz_drivername
);
msg_Dbg
(
vd
,
"DirectXEnumCallback: %s, %s"
,
psz_desc
,
psz_drivername
);
...
@@ -581,7 +578,7 @@ static int DirectXOpenDDraw(vout_display_t *vd)
...
@@ -581,7 +578,7 @@ static int DirectXOpenDDraw(vout_display_t *vd)
}
}
/* */
/* */
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
,
LPVOID
,
DWORD
);
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
A
,
LPVOID
,
DWORD
);
OurDirectDrawEnumerateEx
=
OurDirectDrawEnumerateEx
=
(
void
*
)
GetProcAddress
(
sys
->
hddraw_dll
,
DIRECTDRAWENUMERATEEX_NAME
);
(
void
*
)
GetProcAddress
(
sys
->
hddraw_dll
,
DIRECTDRAWENUMERATEEX_NAME
);
...
@@ -1410,15 +1407,15 @@ typedef struct
...
@@ -1410,15 +1407,15 @@ typedef struct
/*****************************************************************************
/*****************************************************************************
* config variable callback
* config variable callback
*****************************************************************************/
*****************************************************************************/
static
BOOL
WINAPI
DirectXEnumCallback2
(
GUID
*
guid
,
LP
T
STR
desc
,
static
BOOL
WINAPI
DirectXEnumCallback2
(
GUID
*
guid
,
LPSTR
desc
,
LP
T
STR
drivername
,
VOID
*
data
,
LPSTR
drivername
,
VOID
*
data
,
HMONITOR
hmon
)
HMONITOR
hmon
)
{
{
enum_context_t
*
ctx
=
data
;
enum_context_t
*
ctx
=
data
;
VLC_UNUSED
(
guid
);
VLC_UNUSED
(
desc
);
VLC_UNUSED
(
hmon
);
VLC_UNUSED
(
guid
);
VLC_UNUSED
(
desc
);
VLC_UNUSED
(
hmon
);
char
*
psz_drivername
=
(
char
*
)(
drivername
)
;
char
*
psz_drivername
=
drivername
;
ctx
->
values
=
xrealloc
(
ctx
->
values
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
ctx
->
values
=
xrealloc
(
ctx
->
values
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
ctx
->
descs
=
xrealloc
(
ctx
->
descs
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
ctx
->
descs
=
xrealloc
(
ctx
->
descs
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
...
@@ -1445,7 +1442,7 @@ static int FindDevicesCallback(vlc_object_t *object, const char *name,
...
@@ -1445,7 +1442,7 @@ static int FindDevicesCallback(vlc_object_t *object, const char *name,
if
(
hddraw_dll
!=
NULL
)
if
(
hddraw_dll
!=
NULL
)
{
{
/* Enumerate displays */
/* Enumerate displays */
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
,
HRESULT
(
WINAPI
*
OurDirectDrawEnumerateEx
)(
LPDDENUMCALLBACKEX
A
,
LPVOID
,
DWORD
)
=
LPVOID
,
DWORD
)
=
(
void
*
)
GetProcAddress
(
hddraw_dll
,
DIRECTDRAWENUMERATEEX_NAME
);
(
void
*
)
GetProcAddress
(
hddraw_dll
,
DIRECTDRAWENUMERATEEX_NAME
);
if
(
OurDirectDrawEnumerateEx
!=
NULL
)
if
(
OurDirectDrawEnumerateEx
!=
NULL
)
...
...
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