mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-03-29 15:09:46 -06:00
fixed compile issues
This commit is contained in:
parent
1cf22f2484
commit
8d60671ec7
@ -158,17 +158,6 @@ static string config_version = Common::g_scm_rev;
|
||||
static bool overrideControllerColor = false;
|
||||
static int controllerCustomColorRGB[3] = {0, 0, 255};
|
||||
|
||||
std::filesystem::path getFontsPath() {
|
||||
if (fonts_path.empty()) {
|
||||
return Common::FS::GetUserPath(Common::FS::PathType::FontsDir);
|
||||
}
|
||||
return fonts_path;
|
||||
}
|
||||
|
||||
void setFontsPath(const std::filesystem::path& path) {
|
||||
fonts_path = path;
|
||||
}
|
||||
|
||||
bool GetUseUnifiedInputConfig() {
|
||||
return useUnifiedInputConfig.get();
|
||||
}
|
||||
@ -242,7 +231,6 @@ void load(const std::filesystem::path& path, bool is_game_specific) {
|
||||
if (data.contains("General")) {
|
||||
const toml::value& general = data.at("General");
|
||||
userNames.setFromToml(general, "userNames", is_game_specific);
|
||||
fonts_path = toml::find_fs_path_or(general, "fontsPath", fonts_path);
|
||||
}
|
||||
|
||||
if (data.contains("Input")) {
|
||||
@ -324,8 +312,6 @@ void save(const std::filesystem::path& path, bool is_game_specific) {
|
||||
|
||||
if (!is_game_specific) {
|
||||
// Non game-specific entries
|
||||
data["General"]["fontsPath"] = string{fmt::UTF(fonts_path.u8string()).data};
|
||||
|
||||
// Do not save these entries in the game-specific dialog since they are not in the GUI
|
||||
data["Input"]["useUnifiedInputConfig"] = useUnifiedInputConfig.base_value;
|
||||
}
|
||||
|
||||
@ -27,12 +27,6 @@ void save(const std::filesystem::path& path, bool is_game_specific = false);
|
||||
std::string getTrophyKey();
|
||||
void setTrophyKey(std::string key);
|
||||
void setUserName(const std::string& name, bool is_game_specific = false);
|
||||
std::filesystem::path getFontsPath();
|
||||
void setFontsPath(const std::filesystem::path& path);
|
||||
|
||||
enum UsbBackendType : int { Real, SkylandersPortal, InfinityBase, DimensionsToypad };
|
||||
int getUsbDeviceBackend();
|
||||
void setUsbDeviceBackend(int value, bool is_game_specific = false);
|
||||
|
||||
// TODO
|
||||
std::string getUserName(int id);
|
||||
|
||||
@ -215,7 +215,7 @@ public:
|
||||
using std::chrono::microseconds;
|
||||
using std::chrono::steady_clock;
|
||||
|
||||
if (Config::groupIdenticalLogs()) {
|
||||
if (EmulatorSettings::GetInstance()->IsIdenticalLogGrouped()) {
|
||||
std::unique_lock entry_loc(_mutex);
|
||||
|
||||
if (_last_entry.message == message) {
|
||||
@ -228,7 +228,7 @@ public:
|
||||
}
|
||||
|
||||
if (_last_entry.counter >= 1) {
|
||||
if (Config::getLogType() == "async") {
|
||||
if (EmulatorSettings::GetInstance()->GetLogType() == "async") {
|
||||
message_queue.EmplaceWait(_last_entry);
|
||||
} else {
|
||||
ForEachBackend([this](auto& backend) { backend.Write(this->_last_entry); });
|
||||
@ -260,7 +260,7 @@ public:
|
||||
.counter = 1,
|
||||
};
|
||||
|
||||
if (Config::getLogType() == "async") {
|
||||
if (EmulatorSettings::GetInstance()->GetLogType() == "async") {
|
||||
message_queue.EmplaceWait(entry);
|
||||
} else {
|
||||
ForEachBackend([&entry](auto& backend) { backend.Write(entry); });
|
||||
@ -298,14 +298,14 @@ private:
|
||||
}
|
||||
|
||||
void StopBackendThread() {
|
||||
if (Config::groupIdenticalLogs()) {
|
||||
if (EmulatorSettings::GetInstance()->IsIdenticalLogGrouped()) {
|
||||
// log last message
|
||||
if (_last_entry.counter >= 2) {
|
||||
_last_entry.message += " x" + std::to_string(_last_entry.counter);
|
||||
}
|
||||
|
||||
if (_last_entry.counter >= 1) {
|
||||
if (Config::getLogType() == "async") {
|
||||
if (EmulatorSettings::GetInstance()->GetLogType() == "async") {
|
||||
message_queue.EmplaceWait(_last_entry);
|
||||
} else {
|
||||
ForEachBackend([this](auto& backend) { backend.Write(this->_last_entry); });
|
||||
|
||||
@ -240,7 +240,8 @@ void Emulator::Run(std::filesystem::path file, std::vector<std::string> args,
|
||||
LOG_INFO(Config, "Game-specific config exists: {}", has_game_config);
|
||||
|
||||
LOG_INFO(Config, "General LogType: {}", EmulatorSettings::GetInstance()->GetLogType());
|
||||
LOG_INFO(Config, "General isIdenticalLogGrouped: {}", Config::groupIdenticalLogs());
|
||||
LOG_INFO(Config, "General isIdenticalLogGrouped: {}",
|
||||
EmulatorSettings::GetInstance()->IsIdenticalLogGrouped());
|
||||
LOG_INFO(Config, "General isNeo: {}", EmulatorSettings::GetInstance()->IsNeo());
|
||||
LOG_INFO(Config, "General isDevKit: {}", EmulatorSettings::GetInstance()->IsDevKit());
|
||||
LOG_INFO(Config, "General isConnectedToNetwork: {}",
|
||||
@ -390,7 +391,7 @@ void Emulator::Run(std::filesystem::path file, std::vector<std::string> args,
|
||||
VideoCore::SetOutputDir(mount_captures_dir, id);
|
||||
|
||||
// Mount system fonts
|
||||
const auto& fonts_dir = Config::getFontsPath();
|
||||
const auto& fonts_dir = EmulatorSettings::GetInstance()->GetFontsDir();
|
||||
if (!std::filesystem::exists(fonts_dir)) {
|
||||
std::filesystem::create_directory(fonts_dir);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user