Merge pull request #122 from shadps4-emu/psf_info_+_stack_allocation
Psf info + stack allocation
This commit is contained in:
commit
2f9f4e1eeb
|
@ -394,6 +394,8 @@ if (WIN32)
|
|||
endif()
|
||||
# Target Windows 10 RS5
|
||||
add_definitions(-DNTDDI_VERSION=0x0A000006 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
||||
# Increase stack,commit
|
||||
target_link_options(shadps4 PRIVATE /STACK:0x200000,0x200000)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
|
|
18
src/main.cpp
18
src/main.cpp
|
@ -6,6 +6,7 @@
|
|||
#include <Zydis/Zydis.h>
|
||||
#include <fmt/core.h>
|
||||
|
||||
#include <core/file_format/psf.h>
|
||||
#include "common/config.h"
|
||||
#include "common/discord.h"
|
||||
#include "common/logging/backend.h"
|
||||
|
@ -48,6 +49,23 @@ int main(int argc, char* argv[]) {
|
|||
std::filesystem::path p = std::string(path);
|
||||
mnt->Mount(p.parent_path(), "/app0");
|
||||
|
||||
// Loading param.sfo file if exists
|
||||
std::filesystem::path sce_sys_folder = p.parent_path() / "sce_sys";
|
||||
if (std::filesystem::is_directory(sce_sys_folder)) {
|
||||
for (const auto& entry : std::filesystem::directory_iterator(sce_sys_folder)) {
|
||||
if (entry.path().filename() == "param.sfo") {
|
||||
auto* param_sfo = Common::Singleton<PSF>::Instance();
|
||||
param_sfo->open(sce_sys_folder.string() + "/param.sfo");
|
||||
std::string id(param_sfo->GetString("CONTENT_ID"), 7, 9);
|
||||
std::string title(param_sfo->GetString("TITLE"));
|
||||
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
|
||||
u32 fw_version = param_sfo->GetInteger("SYSTEM_VER");
|
||||
std::string app_version = param_sfo->GetString("APP_VER");
|
||||
LOG_INFO(Loader, "Fw: {:#x} App Version: {}", fw_version, app_version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto linker = Common::Singleton<Core::Linker>::Instance();
|
||||
Libraries::InitHLELibs(&linker->getHLESymbols());
|
||||
linker->LoadModule(path);
|
||||
|
|
Loading…
Reference in New Issue