mirror of
https://git.suyu.dev/suyu/suyu
synced 2026-03-12 19:31:06 +00:00
experiment
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "core/file_sys/vfs/vfs_types.h"
|
||||
#include "libretro.h"
|
||||
|
||||
namespace Core::Frontend {
|
||||
class EmuWindow;
|
||||
@@ -140,6 +141,25 @@ enum class SystemResultStatus : u32 {
|
||||
ErrorLoader, ///< The base for loader errors (too many to repeat)
|
||||
};
|
||||
|
||||
class LibretroWrapper {
|
||||
public:
|
||||
LibretroWrapper();
|
||||
~LibretroWrapper();
|
||||
|
||||
bool LoadCore(const std::string& core_path);
|
||||
bool LoadGame(const std::string& game_path);
|
||||
void Run();
|
||||
void Reset();
|
||||
void Unload();
|
||||
|
||||
// Implement other libretro API functions as needed
|
||||
|
||||
private:
|
||||
void* core_handle;
|
||||
retro_game_info game_info;
|
||||
// Add other necessary libretro-related members
|
||||
};
|
||||
|
||||
class System {
|
||||
public:
|
||||
using CurrentBuildProcessID = std::array<u8, 0x20>;
|
||||
@@ -456,9 +476,17 @@ public:
|
||||
/// Applies any changes to settings to this core instance.
|
||||
void ApplySettings();
|
||||
|
||||
// New methods for libretro support
|
||||
bool LoadLibretroCore(const std::string& core_path);
|
||||
bool LoadLibretroGame(const std::string& game_path);
|
||||
void RunLibretroCore();
|
||||
void ResetLibretroCore();
|
||||
void UnloadLibretroCore();
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl;
|
||||
std::unique_ptr<LibretroWrapper> libretro_wrapper;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
Reference in New Issue
Block a user