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
e607973a
Commit
e607973a
authored
Aug 18, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: assume Unicode filesystem on Windows
parent
28caaf85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
33 deletions
+12
-33
modules/gui/skins2/win32/win32_dragdrop.cpp
modules/gui/skins2/win32/win32_dragdrop.cpp
+12
-33
No files found.
modules/gui/skins2/win32/win32_dragdrop.cpp
View file @
e607973a
...
@@ -146,43 +146,22 @@ STDMETHODIMP Win32DragDrop::Drop( LPDATAOBJECT pDataObj, DWORD grfKeyState,
...
@@ -146,43 +146,22 @@ STDMETHODIMP Win32DragDrop::Drop( LPDATAOBJECT pDataObj, DWORD grfKeyState,
void
Win32DragDrop
::
HandleDrop
(
HDROP
HDrop
)
void
Win32DragDrop
::
HandleDrop
(
HDROP
HDrop
)
{
{
if
(
GetVersion
()
<
0x80000000
)
// Get the number of dropped files
{
int
nbFiles
=
DragQueryFileW
(
HDrop
,
0xFFFFFFFF
,
NULL
,
0
);
// Use Unicode for Windows NT and above
// Get the number of dropped files
int
nbFiles
=
DragQueryFileW
(
HDrop
,
0xFFFFFFFF
,
NULL
,
0
);
// For each dropped file
for
(
int
i
=
0
;
i
<
nbFiles
;
i
++
)
{
// Get the name of the file
int
nameLength
=
DragQueryFileW
(
HDrop
,
i
,
NULL
,
0
)
+
1
;
wchar_t
*
psz_fileName
=
new
WCHAR
[
nameLength
];
DragQueryFileW
(
HDrop
,
i
,
psz_fileName
,
nameLength
);
// Add the file
CmdAddItem
cmd
(
getIntf
(),
sFromWide
(
psz_fileName
),
m_playOnDrop
);
cmd
.
execute
();
delete
[]
psz_fileName
;
// For each dropped file
}
for
(
int
i
=
0
;
i
<
nbFiles
;
i
++
)
}
else
{
{
int
nbFiles
=
DragQueryFile
(
HDrop
,
0xFFFFFFFF
,
NULL
,
0
);
// Get the name of the file
int
nameLength
=
DragQueryFileW
(
HDrop
,
i
,
NULL
,
0
)
+
1
;
for
(
int
i
=
0
;
i
<
nbFiles
;
i
++
)
wchar_t
*
psz_fileName
=
new
WCHAR
[
nameLength
];
{
DragQueryFileW
(
HDrop
,
i
,
psz_fileName
,
nameLength
);
int
nameLength
=
DragQueryFile
(
HDrop
,
i
,
NULL
,
0
)
+
1
;
char
*
psz_fileName
=
new
char
[
nameLength
];
DragQueryFile
(
HDrop
,
i
,
psz_fileName
,
nameLength
);
CmdAddItem
cmd
(
getIntf
(),
sFromLocale
(
psz_fileName
),
m_playOnDrop
);
// Add the file
cmd
.
execute
();
CmdAddItem
cmd
(
getIntf
(),
sFromWide
(
psz_fileName
),
m_playOnDrop
);
cmd
.
execute
();
delete
[]
psz_fileName
;
delete
[]
psz_fileName
;
}
}
}
DragFinish
(
HDrop
);
DragFinish
(
HDrop
);
...
...
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