msgba/include/msgba/multiplayer_controller.h

31 lines
697 B
C

#ifndef MS_MULTIPLAYER_CONTROLLER
#define MS_MULTIPLAYER_CONTROLLER
#include <mgba/flags.h>
#include <mgba/core/core.h>
#include <mgba/core/thread.h>
#include <mgba/core/interface.h>
#ifdef M_CORE_GBA
#include <mgba/internal/gba/sio/lockstep.h>
#endif
#ifdef M_CORE_GB
#include <mgba/internal/gb/sio/lockstep.h>
#endif
#include <mgba/core/serialize.h>
#include <mgba-util/vfs.h>
#include <pthread.h>
struct msMultiplayerController {
struct msPlayer *players;
pthread_mutex_t lock;
union {
struct mLockstep m_lockstep;
#ifdef M_CORE_GB
struct GBSIOLockstep m_gbLockstep;
#endif
#ifdef M_CORE_GBA
struct GBASIOLockstep m_gbaLockstep;
#endif
};
};
#endif