mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
Timer 1 minute
This commit is contained in:
parent
5993a42908
commit
af1e6114eb
@ -134,6 +134,11 @@ void Emulator::Run(const std::filesystem::path& file) {
|
||||
}
|
||||
#ifdef ENABLE_QT_GUI
|
||||
MemoryPatcher::g_game_serial = id;
|
||||
|
||||
// Timer for 'Play Time'
|
||||
timer = new QTimer();
|
||||
QObject::connect(timer, &QTimer::timeout, [this, id]() { UpdatePlayTime(id); });
|
||||
timer->start(60000); // 60000 ms = 1 minute
|
||||
#endif
|
||||
title = param_sfo->GetString("TITLE").value_or("Unknown title");
|
||||
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <filesystem>
|
||||
#include <thread>
|
||||
#include <QTimer>
|
||||
|
||||
#include "common/singleton.h"
|
||||
#include "core/linker.h"
|
||||
@ -36,6 +37,7 @@ private:
|
||||
Core::Linker* linker;
|
||||
std::unique_ptr<Frontend::WindowSDL> window;
|
||||
std::chrono::steady_clock::time_point start_time;
|
||||
QTimer* timer;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
Loading…
Reference in New Issue
Block a user