Clang and emulator fixes

This commit is contained in:
Dmugetsu 2025-02-16 12:22:45 -06:00
parent d642033ae4
commit 86a10d6e4a
2 changed files with 101 additions and 109 deletions

View File

@ -335,9 +335,8 @@ void Emulator::Restart() {
LOG_ERROR(Loader, "No previous EBOOT path found! Cannot restart."); LOG_ERROR(Loader, "No previous EBOOT path found! Cannot restart.");
return; return;
} }
} // namespace Core }
void Core::Emulator::LoadSystemModules(const std::string& game_serial) {
void Core::Emulator::LoadSystemModules(const std::string& game_serial) {
constexpr std::array<SysModules, 11> ModulesToLoad{ constexpr std::array<SysModules, 11> ModulesToLoad{
{{"libSceNgs2.sprx", &Libraries::Ngs2::RegisterlibSceNgs2}, {{"libSceNgs2.sprx", &Libraries::Ngs2::RegisterlibSceNgs2},
{"libSceUlt.sprx", nullptr}, {"libSceUlt.sprx", nullptr},
@ -380,10 +379,10 @@ void Core::Emulator::LoadSystemModules(const std::string& game_serial) {
linker->LoadModule(entry.path()); linker->LoadModule(entry.path());
} }
} }
} }
#ifdef ENABLE_QT_GUI #ifdef ENABLE_QT_GUI
void Core::Emulator::UpdatePlayTime(const std::string& serial) const { void Core::Emulator::UpdatePlayTime(const std::string& serial) const {
const auto user_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); const auto user_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
QString filePath = QString::fromStdString((user_dir / "play_time.txt").string()); QString filePath = QString::fromStdString((user_dir / "play_time.txt").string());
@ -449,6 +448,7 @@ void Core::Emulator::UpdatePlayTime(const std::string& serial) const {
} }
} }
LOG_INFO(Loader, "Playing time for {}: {}", serial, playTimeSaved.toStdString()); LOG_INFO(Loader, "Playing time for {}: {}", serial, playTimeSaved.toStdString());
} }
}
#endif #endif
} // namespace Core

View File

@ -1,20 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#ifdef ENABLE_QT_GUI
#include <QCoreApplication>
#include <QFileInfo>
#include <QProcess>
#include <QStandardPaths>
#include <QString>
#include <QThread>
#include "common/memory_patcher.h"
#endif
#include <chrono> #include <chrono>
#include <cstdlib> #include <cstdlib>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <thread> #include <thread>
#include <sys/stat.h>
#include "SDL3/SDL_events.h" #include "SDL3/SDL_events.h"
#include "SDL3/SDL_hints.h" #include "SDL3/SDL_hints.h"
#include "SDL3/SDL_init.h" #include "SDL3/SDL_init.h"