mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 12:04:45 +00:00
ENABLE_QT_GUI
This commit is contained in:
parent
13ea39b515
commit
47089e4300
4 changed files with 21 additions and 17 deletions
|
@ -1,11 +1,9 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef ENABLE_QT_GUI
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include "common/logging/log.h"
|
||||
#include "common/path_util.h"
|
||||
#ifdef ENABLE_QT_GUI
|
||||
#include <QFile>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
|
@ -13,7 +11,8 @@
|
|||
#include <QListView>
|
||||
#include <QMessageBox>
|
||||
#include <QXmlStreamReader>
|
||||
#endif
|
||||
#include "common/logging/log.h"
|
||||
#include "common/path_util.h"
|
||||
#include "memory_patcher.h"
|
||||
|
||||
namespace MemoryPatcher {
|
||||
|
@ -23,7 +22,6 @@ u64 g_eboot_image_size;
|
|||
std::string g_game_serial;
|
||||
std::vector<patchInfo> pending_patches;
|
||||
|
||||
#ifdef ENABLE_QT_GUI
|
||||
QString toHex(unsigned long long value, size_t byteSize) {
|
||||
std::stringstream ss;
|
||||
ss << std::hex << std::setfill('0') << std::setw(byteSize * 2) << value;
|
||||
|
@ -89,12 +87,10 @@ QString convertValueToHex(const QString& type, const QString& valueStr) {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
void OnGameLoaded() {
|
||||
|
||||
// We use the QT headers for the xml and json parsing, this define is only true on QT builds
|
||||
#ifdef ENABLE_QT_GUI
|
||||
// We use the QT headers for the xml and json parsing, this define is only true on QT builds
|
||||
QString patchDir =
|
||||
QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir).string());
|
||||
QString repositories[] = {"GoldHEN", "shadPS4"};
|
||||
|
@ -237,8 +233,6 @@ void OnGameLoaded() {
|
|||
} else {
|
||||
LOG_INFO(Loader, "Patches loaded successfully");
|
||||
}
|
||||
#endif
|
||||
|
||||
ApplyPendingPatches();
|
||||
}
|
||||
}
|
||||
|
@ -352,4 +346,6 @@ uintptr_t PatternScan(const std::string& signature) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace MemoryPatcher
|
||||
} // namespace MemoryPatcher
|
||||
|
||||
#endif
|
|
@ -5,7 +5,9 @@
|
|||
#include "common/alignment.h"
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#ifdef ENABLE_QT_GUI
|
||||
#include "common/memory_patcher.h"
|
||||
#endif
|
||||
#include "common/string_util.h"
|
||||
#include "core/aerolib/aerolib.h"
|
||||
#include "core/cpu_patches.h"
|
||||
|
@ -194,6 +196,7 @@ void Module::LoadModuleToMemory(u32& max_tls_index) {
|
|||
const VAddr entry_addr = base_virtual_addr + elf.GetElfEntry();
|
||||
LOG_INFO(Core_Linker, "program entry addr ..........: {:#018x}", entry_addr);
|
||||
|
||||
#ifdef ENABLE_QT_GUI
|
||||
if (MemoryPatcher::g_eboot_address == 0) {
|
||||
if (name == "eboot") {
|
||||
MemoryPatcher::g_eboot_address = base_virtual_addr;
|
||||
|
@ -201,6 +204,7 @@ void Module::LoadModuleToMemory(u32& max_tls_index) {
|
|||
MemoryPatcher::OnGameLoaded();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Module::LoadDynamicInfo() {
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
#include "common/debug.h"
|
||||
#include "common/logging/backend.h"
|
||||
#include "common/logging/log.h"
|
||||
#ifdef ENABLE_QT_GUI
|
||||
#include "common/memory_patcher.h"
|
||||
#endif
|
||||
#include "common/ntapi.h"
|
||||
#include "common/path_util.h"
|
||||
#include "common/polyfill_thread.h"
|
||||
|
@ -94,7 +96,9 @@ void Emulator::Run(const std::filesystem::path& file) {
|
|||
auto* param_sfo = Common::Singleton<PSF>::Instance();
|
||||
param_sfo->open(sce_sys_folder.string() + "/param.sfo", {});
|
||||
id = std::string(param_sfo->GetString("CONTENT_ID"), 7, 9);
|
||||
#ifdef ENABLE_QT_GUI
|
||||
MemoryPatcher::g_game_serial = id;
|
||||
#endif
|
||||
title = param_sfo->GetString("TITLE");
|
||||
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
|
||||
u32 fw_version = param_sfo->GetInteger("SYSTEM_VER");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<message>
|
||||
<location filename="../about_dialog.ui" line="78"/>
|
||||
<source>shadPS4 is an experimental open-source emulator for the PlayStation 4.</source>
|
||||
<translation>shadPS4 è un emulatore sperimentale open source per Playstation 4.</translation>
|
||||
<translation>shadPS4 è un emulatore sperimentale open source per PlayStation 4.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../about_dialog.ui" line="99"/>
|
||||
|
@ -181,7 +181,7 @@
|
|||
<message>
|
||||
<location filename="../main_window_ui.h" line="318"/>
|
||||
<source>Install application from a .pkg file</source>
|
||||
<translation>Installa applicaazione da un .pkg file</translation>
|
||||
<translation>Installa applicazione da un file .pkg file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main_window_ui.h" line="320"/>
|
||||
|
@ -375,7 +375,7 @@
|
|||
<message>
|
||||
<location filename="../settings_dialog.ui" line="77"/>
|
||||
<source>System</source>
|
||||
<translation>Systema</translation>
|
||||
<translation>Sistema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings_dialog.ui" line="83"/>
|
||||
|
@ -460,7 +460,7 @@
|
|||
<message>
|
||||
<location filename="../settings_dialog.ui" line="462"/>
|
||||
<source>Enable Shaders Dumping</source>
|
||||
<translation>Abilita Scaricamento Shader</translation>
|
||||
<translation>Abilita Dump Shader</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings_dialog.ui" line="469"/>
|
||||
|
@ -470,7 +470,7 @@
|
|||
<message>
|
||||
<location filename="../settings_dialog.ui" line="476"/>
|
||||
<source>Enable PM4 Dumping</source>
|
||||
<translation>Abilita Scaricamento PM4</translation>
|
||||
<translation>Abilita Dump PM4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings_dialog.ui" line="517"/>
|
||||
|
@ -480,7 +480,7 @@
|
|||
<message>
|
||||
<location filename="../settings_dialog.ui" line="537"/>
|
||||
<source>Enable Debug Dumping</source>
|
||||
<translation>Abilita Scaricamento Debug</translation>
|
||||
<translation>Abilita Dump Debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings_dialog.ui" line="560"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue