From 02ae42c7deaee54df64d234d5dbd9624742fbbe7 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 18 Jul 2018 01:38:08 +0200 Subject: [PATCH] [util] Remove getTempDirectory It's not used anywhere. --- src/util/util_env.cpp | 16 ---------------- src/util/util_env.h | 9 --------- 2 files changed, 25 deletions(-) diff --git a/src/util/util_env.cpp b/src/util/util_env.cpp index cd1519581..528d1d2e4 100644 --- a/src/util/util_env.cpp +++ b/src/util/util_env.cpp @@ -36,22 +36,6 @@ namespace dxvk::env { } - std::string getTempDirectory() { - WCHAR windowsTempDir[MAX_PATH] = {0}; - UINT ret = ::GetTempPathW(MAX_PATH, windowsTempDir); - if (ret > MAX_PATH || ret == 0) - return std::string(); - - auto dxvkTempDir = std::wstring(windowsTempDir) + L"dxvk\\"; - if (::CreateDirectoryW(dxvkTempDir.c_str(), 0) == 0) { - if (::GetLastError() != ERROR_ALREADY_EXISTS) - return std::string(); - } - - return str::fromws(dxvkTempDir); - } - - void setThreadName(const wchar_t* name) { using SetThreadDescriptionProc = void (WINAPI *) (HANDLE, PCWSTR); diff --git a/src/util/util_env.h b/src/util/util_env.h index 0a9ca3889..23a40abba 100644 --- a/src/util/util_env.h +++ b/src/util/util_env.h @@ -25,15 +25,6 @@ namespace dxvk::env { */ std::string getExeName(); - /** - * \brief Gets the path to the dxvk specific temporary directory - * - * Returns the path to the temporary directory for dxvk. - * If no such directory can be found the string will be empty. - * \returns Temporary directory - */ - std::string getTempDirectory(); - /** * \brief Sets name of the calling thread * \param [in] name Thread name