diff --git a/src/emulator.cpp b/src/emulator.cpp index 4fe7150d8..453c5a7bc 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -107,9 +107,8 @@ Emulator::~Emulator() { Config::saveMainWindow(config_dir / "config.toml"); } -void Emulator::Run(const std::filesystem::path& file, const std::vector args) { +void Core::Emulator::Run(const std::filesystem::path& file, const std::vector args) { isRunning = true; - const auto eboot_name = file.filename().string(); auto game_folder = file.parent_path(); if (const auto game_folder_name = game_folder.filename().string(); @@ -351,9 +350,11 @@ QProcess::startDetached(emulatorPath, QStringList() << lastEbootPath); QString emulatorPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/shadps4.app/Contents/MacOS/shadps4"; QProcess::startDetached(emulatorPath, QStringList() << lastEbootPath); - isRunning = true; + +isRunning = true; + #endif -} +} // namespace Core void Core::Emulator::LoadSystemModules(const std::string& game_serial) { constexpr std::array ModulesToLoad{ @@ -401,7 +402,7 @@ void Core::Emulator::LoadSystemModules(const std::string& game_serial) { } #ifdef ENABLE_QT_GUI -void Emulator::UpdatePlayTime(const std::string& serial) { +void Core::Emulator::UpdatePlayTime(const std::string& serial) const { const auto user_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); QString filePath = QString::fromStdString((user_dir / "play_time.txt").string()); @@ -468,6 +469,5 @@ void Emulator::UpdatePlayTime(const std::string& serial) { } LOG_INFO(Loader, "Playing time for {}: {}", serial, playTimeSaved.toStdString()); } -#endif - -} // namespace Core +} +#endif \ No newline at end of file diff --git a/src/emulator.h b/src/emulator.h index ce968cd26..0cef61d0d 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -29,12 +29,11 @@ public: ~Emulator(); void Run(const std::filesystem::path& file, const std::vector args = {}); - void UpdatePlayTime(const std::string& serial); + void UpdatePlayTime(const std::string& serial) const; static Emulator& GetInstance(); void StopEmulation(); bool is_running = false; void Restart(); - void Shutdown(); private: void LoadSystemModules(const std::string& game_serial);