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
8b79d0d3
Commit
8b79d0d3
authored
Nov 03, 2006
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support non-ANSI CP characters from command line / click on media file
Closes #809
parent
11eccea0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
src/libvlc.c
src/libvlc.c
+29
-2
No files found.
src/libvlc.c
View file @
8b79d0d3
...
@@ -109,6 +109,8 @@ static void Version ( void );
...
@@ -109,6 +109,8 @@ static void Version ( void );
#ifdef WIN32
#ifdef WIN32
static
void
ShowConsole
(
vlc_bool_t
);
static
void
ShowConsole
(
vlc_bool_t
);
static
void
PauseConsole
(
void
);
static
void
PauseConsole
(
void
);
extern
void
__wgetmainargs
(
int
*
argc
,
wchar_t
***
wargv
,
wchar_t
***
wenviron
,
int
expand_wildcards
,
int
*
startupinfo
);
#endif
#endif
static
int
ConsoleWidth
(
void
);
static
int
ConsoleWidth
(
void
);
...
@@ -2027,6 +2029,17 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
...
@@ -2027,6 +2029,17 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
{
{
int
i_opt
,
i_options
;
int
i_opt
,
i_options
;
#ifdef WIN32
wchar_t
**
wargv
,
**
wenvp
;
int
si
=
{
0
};
if
(
GetVersion
()
<
0x80000000
)
{
/* fetch unicode argv[] for Windows NT and above */
__wgetmainargs
(
&
i_opt
,
&
wargv
,
&
wenvp
,
0
,
&
si
);
}
#endif
/* We assume that the remaining parameters are filenames
/* We assume that the remaining parameters are filenames
* and their input options */
* and their input options */
for
(
i_opt
=
i_argc
-
1
;
i_opt
>=
optind
;
i_opt
--
)
for
(
i_opt
=
i_argc
-
1
;
i_opt
>=
optind
;
i_opt
--
)
...
@@ -2044,11 +2057,25 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
...
@@ -2044,11 +2057,25 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
/* TODO: write an internal function of this one, to avoid
/* TODO: write an internal function of this one, to avoid
* unnecessary lookups. */
* unnecessary lookups. */
/* FIXME: should we convert options to UTF-8 as well ?? */
/* FIXME: should we convert options to UTF-8 as well ?? */
psz_target
=
FromLocale
(
ppsz_argv
[
i_opt
]
);
VLC_AddTarget
(
p_vlc
->
i_object_id
,
psz_target
,
#ifdef WIN32
if
(
GetVersion
()
<
0x80000000
)
{
psz_target
=
FromWide
(
wargv
[
i_opt
]
);
VLC_AddTarget
(
p_vlc
->
i_object_id
,
psz_target
,
(
char
const
**
)(
i_options
?
&
ppsz_argv
[
i_opt
+
1
]
:
(
char
const
**
)(
i_options
?
&
ppsz_argv
[
i_opt
+
1
]
:
NULL
),
i_options
,
NULL
),
i_options
,
PLAYLIST_INSERT
,
0
);
PLAYLIST_INSERT
,
0
);
}
else
#endif
{
psz_target
=
FromLocale
(
ppsz_argv
[
i_opt
]
);
VLC_AddTarget
(
p_vlc
->
i_object_id
,
psz_target
,
(
char
const
**
)(
i_options
?
&
ppsz_argv
[
i_opt
+
1
]
:
NULL
),
i_options
,
PLAYLIST_INSERT
,
0
);
}
LocaleFree
(
psz_target
);
LocaleFree
(
psz_target
);
}
}
...
...
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