From 3180d432e5b1352b5605b5eb9f46aaee439137d1 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 21 Aug 2024 23:59:56 -0700 Subject: [PATCH] Core: Add new mLockstepUser API for upcoming lockstep rewrite --- include/mgba/core/lockstep.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/mgba/core/lockstep.h b/include/mgba/core/lockstep.h index ac6cb3f84..8936d263e 100644 --- a/include/mgba/core/lockstep.h +++ b/include/mgba/core/lockstep.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016 Jeffrey Pfau +/* Copyright (c) 2013-2024 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -53,6 +53,14 @@ static inline void mLockstepUnlock(struct mLockstep* lockstep) { } } +struct mLockstepUser { + void (*sleep)(struct mLockstepUser*); + void (*wake)(struct mLockstepUser*); + + int (*requestedId)(struct mLockstepUser*); + void (*playerIdChanged)(struct mLockstepUser*, int id); +}; + CXX_GUARD_END #endif