msgba/include/msgba/core_controller.h

36 lines
1.1 KiB
C

#ifndef MS_CORE_CONTROLLER
#define MS_CORE_CONTROLLER
#include <unistd.h>
#include <mgba/core/core.h>
#include <mgba/core/thread.h>
#include <msgba/client_connection_data.h>
struct msMultiplayerController;
struct msCoreController {
struct msMultiplayerController *multiplayer;
struct mCoreThread threadContext;
color_t *outputBuffer;
unsigned int stride;
};
struct msCoreController *
msCoreControllerLoadGame (const unsigned char *rom, size_t rom_len,
const unsigned char *state, size_t state_len,
struct msClientConnectionData *const data);
void
msCoreControllerDestroy(struct msCoreController **controller_ptr);
struct msCoreController *
msCoreControllerNew (struct mCore *core, struct msClientConnectionData *const data);
void
msCoreControllerThreadStart (struct msCoreController *const core_controller);
void
msCoreControllerSetFrameCallback(struct msCoreController *const self, void(*callback)(struct mCoreThread *));
void
msCoreControllerSetStartCallback(struct msCoreController *const self, void(*callback)(struct mCoreThread *));
#endif