experiment

This commit is contained in:
Crunch (Chaz9)
2024-09-29 22:31:12 +01:00
parent a7822c2ddb
commit f8802b232b
2 changed files with 117 additions and 0 deletions

View File

@@ -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