shadPS4/src/emulator.h
DanielSvoboda d4eae28ce2
Play Time (#1305)
* Play Time

* SDL

* QT

* Sort / Formatting

* Timer 1 minute

* remove the seconds

removes the seconds from the screen, but in the play_time.txt file it continues to record the seconds for better accuracy, and the screen is cleaner

* fixes the invisible 0

* SDL . . .

* Fix Timer
2024-10-09 13:30:51 +03:00

41 lines
904 B
C++

// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <filesystem>
#include <thread>
#include "common/singleton.h"
#include "core/linker.h"
#include "input/controller.h"
#include "sdl_window.h"
namespace Core {
using HLEInitDef = void (*)(Core::Loader::SymbolsResolver* sym);
struct SysModules {
std::string_view module_name;
HLEInitDef callback;
};
class Emulator {
public:
Emulator();
~Emulator();
void Run(const std::filesystem::path& file);
void UpdatePlayTime(const std::string& serial);
private:
void LoadSystemModules(const std::filesystem::path& file);
Core::MemoryManager* memory;
Input::GameController* controller;
Core::Linker* linker;
std::unique_ptr<Frontend::WindowSDL> window;
std::chrono::steady_clock::time_point start_time;
};
} // namespace Core