diff options
| author | JosJuice <josjuice@gmail.com> | 2020-09-21 11:23:06 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-09-21 17:26:29 +0200 |
| commit | 16d2ef1ea9bc35e0a30806e1406a9aa6be9d409f (patch) | |
| tree | e8d4c872b3466c46276f43d87bec8c12c30e6575 /Source/Core/WinUpdater | |
| parent | 39df01434c3a6f444e658d1bea660ff2a6badcef (diff) | |
DolphinQt: Handle non-ASCII characters in Windows cmd arguments
CommandLineParse expects UTF-8 strings. (QApplication, on the
other hand, seems to be designed so that you can pass in the
char** argv untouched on Windows and get proper Unicode handling.)
Diffstat (limited to 'Source/Core/WinUpdater')
| -rw-r--r-- | Source/Core/WinUpdater/Main.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Source/Core/WinUpdater/Main.cpp b/Source/Core/WinUpdater/Main.cpp index 6afb807941..567486f00a 100644 --- a/Source/Core/WinUpdater/Main.cpp +++ b/Source/Core/WinUpdater/Main.cpp @@ -16,26 +16,6 @@ #include "UpdaterCommon/UI.h" #include "UpdaterCommon/UpdaterCommon.h" -namespace -{ -std::vector<std::string> CommandLineToUtf8Argv(PCWSTR command_line) -{ - int nargs; - LPWSTR* tokenized = CommandLineToArgvW(command_line, &nargs); - if (!tokenized) - return {}; - - std::vector<std::string> argv(nargs); - for (int i = 0; i < nargs; ++i) - { - argv[i] = WStringToUTF8(tokenized[i]); - } - - LocalFree(tokenized); - return argv; -} -}; // namespace - int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) { if (lstrlenW(pCmdLine) == 0) |
