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