Log user CPU, total RAM, and OS (#3402)

* cpu info

Update cpu_info.h

Revert "Update cpu_info.h"

This reverts commit 6db3814e7f8162ca546c33479942d7204524b281.

Revert "cpu info"

This reverts commit cfecdf694fd7bee0fdf025c3933ff7b9498a1c3f.

hardware info

* log OS

* Round RAM, add space

* switch temporarily to local fork

* Update CMakeLists.txt

* set shallow = true for submodule

* Log logical cores as well

* point submodule to shadps4 fork
This commit is contained in:
rainmakerv2
2025-08-14 18:04:08 +08:00
committed by GitHub
parent 882dd889df
commit 2c906dc280
5 changed files with 22 additions and 1 deletions

4
.gitmodules vendored
View File

@@ -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

View File

@@ -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")

View File

@@ -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

1
externals/hwinfo vendored Submodule

Submodule externals/hwinfo added at 2daa11cb25

View File

@@ -4,6 +4,7 @@
#include <filesystem>
#include <set>
#include <fmt/core.h>
#include <hwinfo/hwinfo.h>
#include "common/config.h"
#include "common/debug.h"
@@ -151,6 +152,17 @@ void Emulator::Run(std::filesystem::path file, const std::vector<std::string> 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);