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
d73e233d
Commit
d73e233d
authored
May 05, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify Win32 GetDir, and use the proper header files
parent
e7125f4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
46 deletions
+16
-46
src/config/core.c
src/config/core.c
+16
-46
No files found.
src/config/core.c
View file @
d73e233d
...
@@ -25,6 +25,16 @@
...
@@ -25,6 +25,16 @@
# include "config.h"
# include "config.h"
#endif
#endif
#if defined( WIN32 )
# if !defined( UNDER_CE )
# define _WIN32_IE IE5
# include <w32api.h>
# include <direct.h>
# include <shlobj.h>
# endif
# include <tchar.h>
#endif
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include "../libvlc.h"
#include "../libvlc.h"
#include "vlc_keys.h"
#include "vlc_keys.h"
...
@@ -49,12 +59,6 @@
...
@@ -49,12 +59,6 @@
#if defined( HAVE_SYS_TYPES_H )
#if defined( HAVE_SYS_TYPES_H )
# include <sys/types.h>
# include <sys/types.h>
#endif
#endif
#if defined( WIN32 )
# if !defined( UNDER_CE )
# include <direct.h>
# endif
#include <tchar.h>
#endif
#include "configuration.h"
#include "configuration.h"
#include "modules/modules.h"
#include "modules/modules.h"
...
@@ -622,46 +626,12 @@ static char *GetDir( bool b_appdata )
...
@@ -622,46 +626,12 @@ static char *GetDir( bool b_appdata )
const
char
*
psz_localhome
=
NULL
;
const
char
*
psz_localhome
=
NULL
;
#if defined(WIN32) && !defined(UNDER_CE)
#if defined(WIN32) && !defined(UNDER_CE)
typedef
HRESULT
(
WINAPI
*
SHGETFOLDERPATH
)(
HWND
,
int
,
HANDLE
,
DWORD
,
wchar_t
whomedir
[
MAX_PATH
];
LPWSTR
);
/* Get the "Application Data" folder for the current user */
#ifndef CSIDL_FLAG_CREATE
if
(
S_OK
==
SHGetFolderPathW
(
NULL
,
# define CSIDL_FLAG_CREATE 0x8000
(
b_appdata
?
CSIDL_APPDATA
:
CSIDL_PROFILE
)
|
CSIDL_FLAG_CREATE
,
#endif
NULL
,
SHGFP_TYPE_CURRENT
,
whomedir
)
)
#ifndef CSIDL_APPDATA
return
FromWide
(
whomedir
);
# define CSIDL_APPDATA 0x1A
#endif
#ifndef CSIDL_PROFILE
# define CSIDL_PROFILE 0x28
#endif
#ifndef SHGFP_TYPE_CURRENT
# define SHGFP_TYPE_CURRENT 0
#endif
HINSTANCE
shfolder_dll
;
SHGETFOLDERPATH
SHGetFolderPath
;
/* load the shfolder dll to retrieve SHGetFolderPath */
if
(
(
shfolder_dll
=
LoadLibrary
(
_T
(
"SHFolder.dll"
)
)
)
!=
NULL
)
{
SHGetFolderPath
=
(
void
*
)
GetProcAddress
(
shfolder_dll
,
_T
(
"SHGetFolderPathW"
)
);
if
(
SHGetFolderPath
!=
NULL
)
{
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
,
whomedir
)
)
{
FreeLibrary
(
shfolder_dll
);
return
FromWide
(
whomedir
);
}
}
FreeLibrary
(
shfolder_dll
);
}
#elif defined(UNDER_CE)
#elif defined(UNDER_CE)
(
void
)
b_appdata
;
(
void
)
b_appdata
;
...
...
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