[MPLAY32] Accept paths with double quotes from command-line (#1210)

CORE-15525
This commit is contained in:
Stanislav Motylkov 2018-12-31 23:29:58 +03:00 committed by Hermès BÉLUSCA - MAÏTO
parent 01b580d876
commit ccbc73ac93

View file

@ -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))