shadPS4/src/emulator.h
kalaposfos13 180a34808a Multiple controllers v0
Contains:
- replacing a whole lot of things that were just a global with a 4 long array global
- implementing sceUserServiceGetEvent to handle users connecting/disconnecting (only half done, currently you need to specify the number of players from config
- Even more shit added to remapping, this time a new field denoting the controller ID for the input or output (for inputs it only concerns gamepads, as those are the only ones that you can connect more than one of)
- reverts ngoquang's engine, as it's currently unused, and I didn't want to deal with yet another system that had to be updated
2025-04-15 12:25:09 +02:00

42 lines
945 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, const std::vector<std::string> args = {});
void UpdatePlayTime(const std::string& serial);
private:
void LoadSystemModules(const std::string& game_serial);
Core::MemoryManager* memory;
Input::GameControllers* controllers;
Core::Linker* linker;
std::unique_ptr<Frontend::WindowSDL> window;
std::chrono::steady_clock::time_point start_time;
};
} // namespace Core