Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0038469d
Commit
0038469d
authored
May 06, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use config_GetUserConfDir internally too
parent
75c438d3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
src/config/file.c
src/config/file.c
+8
-6
src/libvlc-common.c
src/libvlc-common.c
+0
-2
src/libvlc.h
src/libvlc.h
+0
-1
No files found.
src/config/file.c
View file @
0038469d
...
@@ -92,7 +92,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
...
@@ -92,7 +92,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
"version 0.6. Your
\n
configuration has been "
"version 0.6. Your
\n
configuration has been "
"copied to the new location:
\n
%s
\n
You can "
"copied to the new location:
\n
%s
\n
You can "
"delete this directory and all its contents."
,
"delete this directory and all its contents."
,
libvlc_priv
(
p_obj
->
p_libvlc
)
->
psz_configdir
);
psz_filename
);
fclose
(
p_readme
);
fclose
(
p_readme
);
}
}
free
(
psz_readme
);
free
(
psz_readme
);
...
@@ -401,8 +401,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
...
@@ -401,8 +401,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
if
(
libvlc_priv
(
p_this
->
p_libvlc
)
->
psz_configfile
==
NULL
)
if
(
libvlc_priv
(
p_this
->
p_libvlc
)
->
psz_configfile
==
NULL
)
{
{
const
char
*
psz_configdir
=
char
*
psz_configdir
=
config_GetUserConfDir
();
libvlc_priv
(
p_this
->
p_libvlc
)
->
psz_configdir
;
if
(
!
psz_configdir
)
/* XXX: This should never happen */
if
(
!
psz_configdir
)
/* XXX: This should never happen */
{
{
msg_Err
(
p_this
,
"no configuration directory defined"
);
msg_Err
(
p_this
,
"no configuration directory defined"
);
...
@@ -411,6 +410,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
...
@@ -411,6 +410,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
}
}
config_CreateDir
(
p_this
,
psz_configdir
);
config_CreateDir
(
p_this
,
psz_configdir
);
free
(
psz_configdir
);
}
}
file
=
config_OpenConfigFile
(
p_this
,
"rt"
);
file
=
config_OpenConfigFile
(
p_this
,
"rt"
);
...
@@ -670,10 +670,12 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
...
@@ -670,10 +670,12 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
*/
*/
char
*
config_GetConfigFile
(
libvlc_int_t
*
p_libvlc
)
char
*
config_GetConfigFile
(
libvlc_int_t
*
p_libvlc
)
{
{
char
*
psz_dir
=
config_GetUserConfDir
();
char
*
psz_configfile
;
char
*
psz_configfile
;
if
(
asprintf
(
&
psz_configfile
,
"%s"
DIR_SEP
CONFIG_FILE
,
libvlc_priv
(
p_libvlc
)
->
psz_configdir
)
==
-
1
)
if
(
asprintf
(
&
psz_configfile
,
"%s"
DIR_SEP
CONFIG_FILE
,
psz_dir
)
==
-
1
)
return
NULL
;
psz_configfile
=
NULL
;
free
(
psz_dir
);
return
psz_configfile
;
return
psz_configfile
;
}
}
...
...
src/libvlc-common.c
View file @
0038469d
...
@@ -296,7 +296,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
...
@@ -296,7 +296,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* Set the config file stuff */
/* Set the config file stuff */
p_libvlc
->
psz_homedir
=
config_GetHomeDir
();
p_libvlc
->
psz_homedir
=
config_GetHomeDir
();
priv
->
psz_configdir
=
config_GetUserConfDir
();
priv
->
psz_datadir
=
config_GetUserDataDir
();
priv
->
psz_datadir
=
config_GetUserDataDir
();
priv
->
psz_configfile
=
config_GetCustomConfigFile
(
p_libvlc
);
priv
->
psz_configfile
=
config_GetCustomConfigFile
(
p_libvlc
);
...
@@ -1061,7 +1060,6 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
...
@@ -1061,7 +1060,6 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
module_EndBank
(
p_libvlc
);
module_EndBank
(
p_libvlc
);
FREENULL
(
p_libvlc
->
psz_homedir
);
FREENULL
(
p_libvlc
->
psz_homedir
);
free
(
priv
->
psz_configdir
);
free
(
priv
->
psz_datadir
);
free
(
priv
->
psz_datadir
);
FREENULL
(
priv
->
psz_configfile
);
FREENULL
(
priv
->
psz_configfile
);
var_DelCallback
(
p_libvlc
,
"key-pressed"
,
vlc_key_to_action
,
var_DelCallback
(
p_libvlc
,
"key-pressed"
,
vlc_key_to_action
,
...
...
src/libvlc.h
View file @
0038469d
...
@@ -211,7 +211,6 @@ typedef struct libvlc_priv_t
...
@@ -211,7 +211,6 @@ typedef struct libvlc_priv_t
/* Configuration */
/* Configuration */
vlc_mutex_t
config_lock
;
///< config file lock
vlc_mutex_t
config_lock
;
///< config file lock
char
*
psz_configfile
;
///< location of config file
char
*
psz_configfile
;
///< location of config file
char
*
psz_configdir
;
///< user configuration directory
char
*
psz_datadir
;
///< user data directory
char
*
psz_datadir
;
///< user data directory
/* There is no real reason to keep a list of items, but not to break
/* There is no real reason to keep a list of items, but not to 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