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
8d9bd047
Commit
8d9bd047
authored
Nov 12, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another Win32 FromLocale -> FromWide
parent
fa417ad8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
src/misc/configuration.c
src/misc/configuration.c
+9
-14
No files found.
src/misc/configuration.c
View file @
8d9bd047
...
...
@@ -1713,7 +1713,7 @@ const char *config_GetDataDir( const vlc_object_t *p_this )
*****************************************************************************/
static
char
*
GetDir
(
vlc_bool_t
b_appdata
)
{
char
*
psz_localhome
=
NULL
;
c
onst
c
har
*
psz_localhome
=
NULL
;
#if defined(HAVE_GETPWUID)
struct
passwd
*
p_pw
=
NULL
;
...
...
@@ -1721,7 +1721,7 @@ static char *GetDir( vlc_bool_t b_appdata )
#if defined(WIN32) && !defined(UNDER_CE)
typedef
HRESULT
(
WINAPI
*
SHGETFOLDERPATH
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPSTR
);
LP
W
STR
);
#ifndef CSIDL_FLAG_CREATE
# define CSIDL_FLAG_CREATE 0x8000
#endif
...
...
@@ -1742,20 +1742,20 @@ static char *GetDir( vlc_bool_t b_appdata )
if
(
(
shfolder_dll
=
LoadLibrary
(
_T
(
"SHFolder.dll"
)
)
)
!=
NULL
)
{
SHGetFolderPath
=
(
void
*
)
GetProcAddress
(
shfolder_dll
,
_T
(
"SHGetFolderPath
A
"
)
);
_T
(
"SHGetFolderPath
W
"
)
);
if
(
SHGetFolderPath
!=
NULL
)
{
char
psz_ACPhome
[
MAX_PATH
];
wchar_t
whomedir
[
MAX_PATH
];
/* get the "Application Data" folder for the current user */
if
(
S_OK
==
SHGetFolderPath
(
NULL
,
(
b_appdata
?
CSIDL_APPDATA
:
CSIDL_PROFILE
)
|
CSIDL_FLAG_CREATE
,
NULL
,
SHGFP_TYPE_CURRENT
,
psz_ACPhome
)
)
whomedir
)
)
{
FreeLibrary
(
shfolder_dll
);
return
From
LocaleDup
(
psz_ACPhome
);
return
From
Wide
(
whomedir
);
}
}
FreeLibrary
(
shfolder_dll
);
...
...
@@ -1767,16 +1767,11 @@ static char *GetDir( vlc_bool_t b_appdata )
# define CSIDL_APPDATA 0x1A
#endif
wchar_t
p_
whomedir
[
MAX_PATH
];
wchar_t
whomedir
[
MAX_PATH
];
/* get the "Application Data" folder for the current user */
if
(
SHGetSpecialFolderPath
(
NULL
,
p_whomedir
,
CSIDL_APPDATA
,
1
)
)
{
char
psz_ACPhome
[
2
*
MAX_PATH
];
sprintf
(
psz_ACPhome
,
"%ls"
,
p_whomedir
);
return
FromLocaleDup
(
psz_ACPhome
);
}
if
(
SHGetSpecialFolderPath
(
NULL
,
whomedir
,
CSIDL_APPDATA
,
1
)
)
return
FromWide
(
whomedir
);
#endif
#if defined(HAVE_GETPWUID)
...
...
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