https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ccbc73ac933405c6238a3c803940f9b2bb0bfeb7

commit ccbc73ac933405c6238a3c803940f9b2bb0bfeb7
Author:     Stanislav Motylkov <[email protected]>
AuthorDate: Mon Dec 31 23:29:58 2018 +0300
Commit:     Hermès BÉLUSCA - MAÏTO <[email protected]>
CommitDate: Mon Dec 31 21:29:58 2018 +0100

    [MPLAY32] Accept paths with double quotes from command-line (#1210)
    
    CORE-15525
---
 base/applications/mplay32/mplay32.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/base/applications/mplay32/mplay32.c 
b/base/applications/mplay32/mplay32.c
index e5299cb539..2b70c1d0de 100644
--- a/base/applications/mplay32/mplay32.c
+++ b/base/applications/mplay32/mplay32.c
@@ -12,6 +12,12 @@
 #define MAIN_WINDOW_MIN_WIDTH 250
 #define MAX_MCISTR            256
 
+#ifdef UNICODE
+#define argv __wargv
+#else
+#define argv __argv
+#endif
+
 HINSTANCE hInstance = NULL;
 HWND hTrackBar = NULL;
 HWND hToolBar = NULL;
@@ -1537,7 +1543,14 @@ _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR 
lpCmdLine, INT nCmdShow)
     ShowWindow(hwnd, SW_SHOW);
     UpdateWindow(hwnd);
 
-    OpenMediaFile(hwnd, lpCmdLine, NULL);
+    if (*lpCmdLine == _T('"'))
+    {
+        OpenMediaFile(hwnd, argv[1], NULL);
+    }
+    else
+    {
+        OpenMediaFile(hwnd, lpCmdLine, NULL);
+    }
 
     /* Message Loop */
     while (GetMessage(&msg, NULL, 0, 0))

Reply via email to