diff options
| author | Léo Lam <leo@leolam.fr> | 2019-11-09 21:10:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-09 21:10:16 +0100 |
| commit | f4e12f85bce7f0ad3c3fcc5d19d7db495600a41b (patch) | |
| tree | 5960897f371699d1b107c4c7007d541fb8694d79 /Source/Core/WinUpdater/Main.cpp | |
| parent | 6cb60f8d364fc9887bfb4779993036d5554902a2 (diff) | |
| parent | ea8a3059bff1693ea640777a3aeb0c31daf18951 (diff) | |
Merge pull request #8393 from CookiePLMonster/long-paths
Support Windows 10 long paths
Diffstat (limited to 'Source/Core/WinUpdater/Main.cpp')
| -rw-r--r-- | Source/Core/WinUpdater/Main.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/Source/Core/WinUpdater/Main.cpp b/Source/Core/WinUpdater/Main.cpp index 9196805819..2e1bd36ff8 100644 --- a/Source/Core/WinUpdater/Main.cpp +++ b/Source/Core/WinUpdater/Main.cpp @@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "Common/CommonFuncs.h" #include "Common/StringUtil.h" #include "UpdaterCommon/UI.h" @@ -33,28 +34,6 @@ std::vector<std::string> CommandLineToUtf8Argv(PCWSTR command_line) LocalFree(tokenized); return argv; } - -std::optional<std::wstring> GetModuleName(HINSTANCE hInstance) -{ - std::wstring name; - DWORD max_size = 50; // Start with space for 50 characters and grow if needed - name.resize(max_size); - - DWORD size; - while ((size = GetModuleFileNameW(hInstance, name.data(), max_size)) == max_size && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - max_size *= 2; - name.resize(max_size); - } - - if (size == 0) - { - return {}; - } - name.resize(size); - return name; -} }; // namespace int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) |
