Mercurial > minori
comparison dep/animone/src/fd/win32.cc @ 343:1faa72660932
*: transfer back to cmake from autotools
autotools just made lots of things more complicated than
they should have and many things broke (i.e. translations)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 20 Jun 2024 05:56:06 -0400 |
parents | adb79bdde329 |
children |
comparison
equal
deleted
inserted
replaced
342:adb79bdde329 | 343:1faa72660932 |
---|---|
141 } | 141 } |
142 | 142 |
143 /* ------------------------------------------------------------------- */ | 143 /* ------------------------------------------------------------------- */ |
144 | 144 |
145 static bool GetSystemDirectory(std::wstring& str) { | 145 static bool GetSystemDirectory(std::wstring& str) { |
146 /* libtool can't link with -luuid properly. */ | |
147 constexpr uint32_t WindowsDir = 0x24; | |
146 str.assign(MAX_PATH, '\0'); | 148 str.assign(MAX_PATH, '\0'); |
147 | 149 |
148 return SUCCEEDED(::SHGetFolderPathW(NULL, CSIDL_WINDOWS, NULL, SHGFP_TYPE_CURRENT, &str.front())); | 150 return SUCCEEDED(::SHGetFolderPathW(NULL, WindowsDir, NULL, SHGFP_TYPE_CURRENT, &str.front())); |
149 } | 151 } |
150 | 152 |
151 static bool IsSystemDirectory(std::wstring path) { | 153 static bool IsSystemDirectory(std::wstring path) { |
152 std::wstring windir; | 154 std::wstring windir; |
153 if (!GetSystemDirectory(windir)) | 155 if (!GetSystemDirectory(windir)) |