Merge branch 'shadps4-emu:main' into main
This commit is contained in:
commit
effd813b93
|
@ -527,8 +527,7 @@ set(EMULATOR src/emulator.cpp
|
||||||
if(ENABLE_QT_GUI)
|
if(ENABLE_QT_GUI)
|
||||||
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)
|
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)
|
||||||
|
|
||||||
set(QT_GUI
|
set(QT_GUI src/qt_gui/main_window_ui.h
|
||||||
src/qt_gui/main_window_ui.h
|
|
||||||
src/qt_gui/main_window.cpp
|
src/qt_gui/main_window.cpp
|
||||||
src/qt_gui/main_window.h
|
src/qt_gui/main_window.h
|
||||||
src/qt_gui/gui_context_menus.h
|
src/qt_gui/gui_context_menus.h
|
||||||
|
|
|
@ -16,6 +16,7 @@ static u32 screenHeight = 720;
|
||||||
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
|
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
|
||||||
static std::string logFilter;
|
static std::string logFilter;
|
||||||
static std::string logType = "async";
|
static std::string logType = "async";
|
||||||
|
static std::string userName = "shadPS4";
|
||||||
static bool isDebugDump = false;
|
static bool isDebugDump = false;
|
||||||
static bool isLibc = true;
|
static bool isLibc = true;
|
||||||
static bool isShowSplash = false;
|
static bool isShowSplash = false;
|
||||||
|
@ -80,6 +81,10 @@ std::string getLogType() {
|
||||||
return logType;
|
return logType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
bool debugDump() {
|
bool debugDump() {
|
||||||
return isDebugDump;
|
return isDebugDump;
|
||||||
}
|
}
|
||||||
|
@ -192,6 +197,10 @@ void setLogFilter(std::string type) {
|
||||||
logFilter = type;
|
logFilter = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setUserName(std::string type) {
|
||||||
|
userName = type;
|
||||||
|
}
|
||||||
|
|
||||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
|
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
|
||||||
main_window_geometry_x = x;
|
main_window_geometry_x = x;
|
||||||
main_window_geometry_y = y;
|
main_window_geometry_y = y;
|
||||||
|
@ -313,6 +322,7 @@ void load(const std::filesystem::path& path) {
|
||||||
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
||||||
logFilter = toml::find_or<std::string>(general, "logFilter", "");
|
logFilter = toml::find_or<std::string>(general, "logFilter", "");
|
||||||
logType = toml::find_or<std::string>(general, "logType", "sync");
|
logType = toml::find_or<std::string>(general, "logType", "sync");
|
||||||
|
userName = toml::find_or<std::string>(general, "userName", "shadPS4");
|
||||||
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
|
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,6 +410,7 @@ void save(const std::filesystem::path& path) {
|
||||||
data["General"]["Fullscreen"] = isFullscreen;
|
data["General"]["Fullscreen"] = isFullscreen;
|
||||||
data["General"]["logFilter"] = logFilter;
|
data["General"]["logFilter"] = logFilter;
|
||||||
data["General"]["logType"] = logType;
|
data["General"]["logType"] = logType;
|
||||||
|
data["General"]["userName"] = userName;
|
||||||
data["General"]["showSplash"] = isShowSplash;
|
data["General"]["showSplash"] = isShowSplash;
|
||||||
data["GPU"]["screenWidth"] = screenWidth;
|
data["GPU"]["screenWidth"] = screenWidth;
|
||||||
data["GPU"]["screenHeight"] = screenHeight;
|
data["GPU"]["screenHeight"] = screenHeight;
|
||||||
|
@ -446,6 +457,7 @@ void setDefaultValues() {
|
||||||
screenHeight = 720;
|
screenHeight = 720;
|
||||||
logFilter = "";
|
logFilter = "";
|
||||||
logType = "async";
|
logType = "async";
|
||||||
|
userName = "shadPS4";
|
||||||
isDebugDump = false;
|
isDebugDump = false;
|
||||||
isShowSplash = false;
|
isShowSplash = false;
|
||||||
isNullGpu = false;
|
isNullGpu = false;
|
||||||
|
|
|
@ -15,6 +15,7 @@ bool isNeoMode();
|
||||||
bool isFullscreenMode();
|
bool isFullscreenMode();
|
||||||
std::string getLogFilter();
|
std::string getLogFilter();
|
||||||
std::string getLogType();
|
std::string getLogType();
|
||||||
|
std::string getUserName();
|
||||||
|
|
||||||
u32 getScreenWidth();
|
u32 getScreenWidth();
|
||||||
u32 getScreenHeight();
|
u32 getScreenHeight();
|
||||||
|
@ -42,6 +43,7 @@ void setScreenHeight(u32 height);
|
||||||
void setFullscreenMode(bool enable);
|
void setFullscreenMode(bool enable);
|
||||||
void setLanguage(u32 language);
|
void setLanguage(u32 language);
|
||||||
void setNeoMode(bool enable);
|
void setNeoMode(bool enable);
|
||||||
|
void setUserName(std::string type);
|
||||||
|
|
||||||
void setLogType(std::string type);
|
void setLogType(std::string type);
|
||||||
void setLogFilter(std::string type);
|
void setLogFilter(std::string type);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
// Generated By moduleGenerator
|
// Generated By moduleGenerator
|
||||||
|
#include "common/config.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/libraries/error_codes.h"
|
#include "core/libraries/error_codes.h"
|
||||||
#include "core/libraries/libs.h"
|
#include "core/libraries/libs.h"
|
||||||
|
@ -977,7 +978,7 @@ int PS4_SYSV_ABI sceNpGetGamePresenceStatusA() {
|
||||||
int PS4_SYSV_ABI sceNpGetNpId(OrbisUserServiceUserId userId, OrbisNpId* npId) {
|
int PS4_SYSV_ABI sceNpGetNpId(OrbisUserServiceUserId userId, OrbisNpId* npId) {
|
||||||
LOG_ERROR(Lib_NpManager, "(DUMMY) called");
|
LOG_ERROR(Lib_NpManager, "(DUMMY) called");
|
||||||
|
|
||||||
std::string name = "shadps4";
|
std::string name = Config::getUserName();
|
||||||
strcpy(npId->handle.data, name.c_str());
|
strcpy(npId->handle.data, name.c_str());
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "common/ntapi.h"
|
#include "common/ntapi.h"
|
||||||
#include "common/path_util.h"
|
#include "common/path_util.h"
|
||||||
#include "common/polyfill_thread.h"
|
#include "common/polyfill_thread.h"
|
||||||
|
#include "common/scm_rev.h"
|
||||||
#include "common/singleton.h"
|
#include "common/singleton.h"
|
||||||
#include "common/version.h"
|
#include "common/version.h"
|
||||||
#include "core/file_format/playgo_chunk.h"
|
#include "core/file_format/playgo_chunk.h"
|
||||||
|
@ -26,7 +27,6 @@
|
||||||
#include "core/linker.h"
|
#include "core/linker.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "emulator.h"
|
#include "emulator.h"
|
||||||
#include "src/common/scm_rev.h"
|
|
||||||
#include "video_core/renderdoc.h"
|
#include "video_core/renderdoc.h"
|
||||||
|
|
||||||
Frontend::WindowSDL* g_window = nullptr;
|
Frontend::WindowSDL* g_window = nullptr;
|
||||||
|
|
|
@ -43,6 +43,9 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
||||||
{
|
{
|
||||||
connect(ui->consoleLanguageComboBox, &QComboBox::currentIndexChanged, this,
|
connect(ui->consoleLanguageComboBox, &QComboBox::currentIndexChanged, this,
|
||||||
[](int index) { Config::setLanguage(index); });
|
[](int index) { Config::setLanguage(index); });
|
||||||
|
|
||||||
|
connect(ui->userNameLineEdit, &QLineEdit::textChanged, this,
|
||||||
|
[](const QString& text) { Config::setUserName(text.toStdString()); });
|
||||||
}
|
}
|
||||||
|
|
||||||
// GPU TAB
|
// GPU TAB
|
||||||
|
@ -121,6 +124,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||||
ui->ps4proCheckBox->setChecked(Config::isNeoMode());
|
ui->ps4proCheckBox->setChecked(Config::isNeoMode());
|
||||||
ui->logTypeComboBox->setCurrentText(QString::fromStdString(Config::getLogType()));
|
ui->logTypeComboBox->setCurrentText(QString::fromStdString(Config::getLogType()));
|
||||||
ui->logFilterLineEdit->setText(QString::fromStdString(Config::getLogFilter()));
|
ui->logFilterLineEdit->setText(QString::fromStdString(Config::getLogFilter()));
|
||||||
|
ui->userNameLineEdit->setText(QString::fromStdString(Config::getUserName()));
|
||||||
|
|
||||||
ui->debugDump->setChecked(Config::debugDump());
|
ui->debugDump->setChecked(Config::debugDump());
|
||||||
ui->vkValidationCheckBox->setChecked(Config::vkValidationEnabled());
|
ui->vkValidationCheckBox->setChecked(Config::vkValidationEnabled());
|
||||||
|
|
|
@ -231,6 +231,32 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="vLayoutUserName">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="hLayoutUserName">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="userName">
|
||||||
|
<property name="title">
|
||||||
|
<string>Username</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="userNameLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="userNameLineEdit"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widgetSettingsTop" native="true">
|
<widget class="QWidget" name="widgetSettingsTop" native="true">
|
||||||
<layout class="QHBoxLayout" name="widgetGpuTopLayout">
|
<layout class="QHBoxLayout" name="widgetGpuTopLayout">
|
||||||
|
|
Loading…
Reference in New Issue