Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8978e821
Commit
8978e821
authored
Nov 11, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32 ANSI -> Unicode +
UTF-8
wrappers
parent
7554c22c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
21 deletions
+14
-21
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+14
-21
No files found.
src/video_output/vout_intf.c
View file @
8978e821
...
...
@@ -40,6 +40,7 @@
#include "vlc_image.h"
#include "vlc_spu.h"
#include "vlc_strings.h"
#include "charset.h"
#include <snapshot.h>
...
...
@@ -564,7 +565,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
char
*
p_mypicturesdir
=
NULL
;
typedef
HRESULT
(
WINAPI
*
SHGETFOLDERPATH
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPSTR
);
LP
W
STR
);
#ifndef CSIDL_FLAG_CREATE
# define CSIDL_FLAG_CREATE 0x8000
#endif
...
...
@@ -581,24 +582,16 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
/* load the shfolder dll to retrieve SHGetFolderPath */
if
(
(
shfolder_dll
=
LoadLibrary
(
_T
(
"SHFolder.dll"
)
)
)
!=
NULL
)
{
SHGetFolderPath
=
(
void
*
)
GetProcAddress
(
shfolder_dll
,
_T
(
"SHGetFolderPathA"
)
);
if
(
SHGetFolderPath
!=
NULL
)
{
p_mypicturesdir
=
(
char
*
)
malloc
(
MAX_PATH
);
if
(
p_mypicturesdir
)
{
if
(
S_OK
!=
SHGetFolderPath
(
NULL
,
CSIDL_MYPICTURES
|
CSIDL_FLAG_CREATE
,
NULL
,
SHGFP_TYPE_CURRENT
,
p_mypicturesdir
)
)
{
free
(
p_mypicturesdir
);
p_mypicturesdir
=
NULL
;
}
}
}
wchar_t
wdir
[
PATH_MAX
];
SHGetFolderPath
=
(
void
*
)
GetProcAddress
(
shfolder_dll
,
_T
(
"SHGetFolderPathW"
)
);
if
((
SHGetFolderPath
!=
NULL
)
&&
SUCCEEDED
(
SHGetFolderPath
(
NULL
,
CSIDL_MYPICTURES
|
CSIDL_FLAG_CREATE
,
NULL
,
SHGFP_TYPE_CURRENT
,
wdir
)))
p_mypictureswdir
=
FromWide
(
wdir
);
FreeLibrary
(
shfolder_dll
);
}
...
...
@@ -637,7 +630,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
/*
* Did the user specify a directory? If not, path = NULL.
*/
path
=
opendir
(
(
const
char
*
)
val
.
psz_string
);
path
=
utf8_
opendir
(
(
const
char
*
)
val
.
psz_string
);
if
(
path
!=
NULL
)
{
...
...
@@ -654,7 +647,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
asprintf
(
&
psz_filename
,
"%s/%s%05d.%s"
,
val
.
psz_string
,
psz_prefix
,
i_num
++
,
format
.
psz_string
);
}
while
(
(
p_file
=
fopen
(
psz_filename
,
"r"
)
)
&&
!
fclose
(
p_file
)
);
while
(
(
p_file
=
utf8_
fopen
(
psz_filename
,
"r"
)
)
&&
!
fclose
(
p_file
)
);
var_SetInteger
(
p_vout
,
"snapshot-num"
,
i_num
);
}
else
...
...
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