summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu/CMakeLists.txt1
-rw-r--r--src/yuzu/main.cpp29
2 files changed, 30 insertions, 0 deletions
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index 9259ca15e..242867a4f 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -244,6 +244,7 @@ elseif(WIN32)
244 target_link_libraries(yuzu PRIVATE Qt5::WinMain) 244 target_link_libraries(yuzu PRIVATE Qt5::WinMain)
245 endif() 245 endif()
246 if(MSVC) 246 if(MSVC)
247 target_link_libraries(yuzu PRIVATE version.lib)
247 set_target_properties(yuzu PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") 248 set_target_properties(yuzu PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
248 elseif(MINGW) 249 elseif(MINGW)
249 set_target_properties(yuzu PROPERTIES LINK_FLAGS_RELEASE "-Wl,--subsystem,windows") 250 set_target_properties(yuzu PROPERTIES LINK_FLAGS_RELEASE "-Wl,--subsystem,windows")
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 89b1d9824..27f23bcb0 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -199,6 +199,34 @@ static void RemoveCachedContents() {
199 Common::FS::RemoveDirRecursively(offline_system_data); 199 Common::FS::RemoveDirRecursively(offline_system_data);
200} 200}
201 201
202static void LogRuntimes() {
203#ifdef _MSC_VER
204 // It is possible that the name of the dll will change.
205 // vcruntime140.dll is for 2015 and onwards
206 constexpr char runtime_dll_name[] = "vcruntime140.dll";
207 UINT sz = GetFileVersionInfoSizeA(runtime_dll_name, nullptr);
208 bool runtime_version_inspection_worked = false;
209 if (sz > 0) {
210 std::vector<u8> buf(sz);
211 if (GetFileVersionInfoA(runtime_dll_name, 0, sz, buf.data())) {
212 VS_FIXEDFILEINFO* pvi;
213 sz = sizeof(VS_FIXEDFILEINFO);
214 if (VerQueryValueA(buf.data(), "\\", reinterpret_cast<LPVOID*>(&pvi), &sz)) {
215 if (pvi->dwSignature == VS_FFI_SIGNATURE) {
216 runtime_version_inspection_worked = true;
217 LOG_INFO(Frontend, "MSVC Compiler: {} Runtime: {}.{}.{}.{}", _MSC_VER,
218 pvi->dwProductVersionMS >> 16, pvi->dwProductVersionMS & 0xFFFF,
219 pvi->dwProductVersionLS >> 16, pvi->dwProductVersionLS & 0xFFFF);
220 }
221 }
222 }
223 }
224 if (!runtime_version_inspection_worked) {
225 LOG_INFO(Frontend, "Unable to inspect {}", runtime_dll_name);
226 }
227#endif
228}
229
202static QString PrettyProductName() { 230static QString PrettyProductName() {
203#ifdef _WIN32 231#ifdef _WIN32
204 // After Windows 10 Version 2004, Microsoft decided to switch to a different notation: 20H2 232 // After Windows 10 Version 2004, Microsoft decided to switch to a different notation: 20H2
@@ -269,6 +297,7 @@ GMainWindow::GMainWindow()
269 const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; 297 const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build;
270 298
271 LOG_INFO(Frontend, "yuzu Version: {}", yuzu_build_version); 299 LOG_INFO(Frontend, "yuzu Version: {}", yuzu_build_version);
300 LogRuntimes();
272#ifdef ARCHITECTURE_x86_64 301#ifdef ARCHITECTURE_x86_64
273 const auto& caps = Common::GetCPUCaps(); 302 const auto& caps = Common::GetCPUCaps();
274 std::string cpu_string = caps.cpu_string; 303 std::string cpu_string = caps.cpu_string;