mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +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
|
#ifdef ENABLE_QT_GUI
|
||||||
MemoryPatcher::g_game_serial = id;
|
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
|
#endif
|
||||||
title = param_sfo->GetString("TITLE").value_or("Unknown title");
|
title = param_sfo->GetString("TITLE").value_or("Unknown title");
|
||||||
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
|
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
#include "common/singleton.h"
|
#include "common/singleton.h"
|
||||||
#include "core/linker.h"
|
#include "core/linker.h"
|
||||||
@ -36,6 +37,7 @@ private:
|
|||||||
Core::Linker* linker;
|
Core::Linker* linker;
|
||||||
std::unique_ptr<Frontend::WindowSDL> window;
|
std::unique_ptr<Frontend::WindowSDL> window;
|
||||||
std::chrono::steady_clock::time_point start_time;
|
std::chrono::steady_clock::time_point start_time;
|
||||||
|
QTimer* timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
Loading…
Reference in New Issue
Block a user