all repos — mgba @ 4d24b16735001b96dcee2bebc49560185f969b03

mGBA Game Boy Advance Emulator

src/platform/qt/MultiplayerController.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef QGBA_MULTIPLAYER_CONTROLLER
 7#define QGBA_MULTIPLAYER_CONTROLLER
 8
 9#include <QObject>
10
11extern "C" {
12#include "gba/sio/lockstep.h"
13}
14
15namespace QGBA {
16
17class GameController;
18
19class MultiplayerController : public QObject {
20Q_OBJECT
21
22public:
23	MultiplayerController();
24	~MultiplayerController();
25
26	bool attachGame(GameController*);
27	void detachGame(GameController*);
28
29	int attached();
30	int playerId(GameController*);
31
32signals:
33	void gameAttached();
34	void gameDetached();
35
36private:
37	GBASIOLockstep m_lockstep;
38};
39
40}
41#endif