diff --git a/.gitmodules b/.gitmodules index 7e2361701..940c0417d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -109,3 +109,7 @@ [submodule "externals/epoll-shim"] path = externals/epoll-shim url = https://github.com/jiixyj/epoll-shim.git +[submodule "externals/hwinfo"] + path = externals/hwinfo + url = https://github.com/shadps4-emu/ext-hwinfo + shallow = true diff --git a/CMakeLists.txt b/CMakeLists.txt index 4859d8a9e..828838513 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1137,7 +1137,7 @@ endif() create_target_directory_groups(shadps4) target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak::xbyak Tracy::TracyClient RenderDoc::API FFmpeg::ffmpeg Dear_ImGui gcn half::half ZLIB::ZLIB PNG::PNG) -target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator LibAtrac9 sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::glslang SDL3::SDL3 pugixml::pugixml stb::headers libusb::usb) +target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator LibAtrac9 sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::glslang SDL3::SDL3 pugixml::pugixml stb::headers libusb::usb lfreist-hwinfo::hwinfo) target_compile_definitions(shadps4 PRIVATE IMGUI_USER_CONFIG="imgui/imgui_config.h") target_compile_definitions(Dear_ImGui PRIVATE IMGUI_USER_CONFIG="${PROJECT_SOURCE_DIR}/src/imgui/imgui_config.h") diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index c0c39508a..1fc206259 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -216,6 +216,10 @@ if (NOT TARGET stb::headers) add_library(stb::headers ALIAS stb) endif() +# hwinfo +set(HWINFO_STATIC ON) +add_subdirectory(hwinfo) + # Apple-only dependencies if (APPLE) # date diff --git a/externals/hwinfo b/externals/hwinfo new file mode 160000 index 000000000..2daa11cb2 --- /dev/null +++ b/externals/hwinfo @@ -0,0 +1 @@ +Subproject commit 2daa11cb25c84df92b53b57e8d8b730717010bb6 diff --git a/src/emulator.cpp b/src/emulator.cpp index e100214b0..ec307488a 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "common/config.h" #include "common/debug.h" @@ -151,6 +152,17 @@ void Emulator::Run(std::filesystem::path file, const std::vector ar LOG_INFO(Config, "Vulkan guestMarkers: {}", Config::getVkGuestMarkersEnabled()); LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled()); + hwinfo::Memory ram; + hwinfo::OS os; + const auto cpus = hwinfo::getAllCPUs(); + for (const auto& cpu : cpus) { + LOG_INFO(Config, "CPU Model: {}", cpu.modelName()); + LOG_INFO(Config, "CPU Physical Cores: {}, Logical Cores: {}", cpu.numPhysicalCores(), + cpu.numLogicalCores()); + } + LOG_INFO(Config, "Total RAM: {} GB", std::round(ram.total_Bytes() / pow(1024, 3))); + LOG_INFO(Config, "Operating System: {}", os.name()); + if (param_sfo_exists) { LOG_INFO(Loader, "Game id: {} Title: {}", id, title); LOG_INFO(Loader, "Fw: {:#x} App Version: {}", fw_version, app_version);