src/platform/qt/GameController.h (view raw)
1#ifndef QGBA_GAME_CONTROLLER
2#define QGBA_GAME_CONTROLLER
3
4#include <QFile>
5#include <QImage>
6#include <QObject>
7#include <QString>
8
9#include "AudioDevice.h"
10
11extern "C" {
12#include "gba-thread.h"
13}
14
15struct GBAAudio;
16struct GBAVideoSoftwareRenderer;
17
18namespace QGBA {
19
20class GameController : public QObject {
21Q_OBJECT
22
23public:
24 GameController(QObject* parent = 0);
25 ~GameController();
26
27signals:
28 void frameAvailable(const QImage&);
29 void audioDeviceAvailable(GBAAudio*);
30
31public slots:
32 bool loadGame(const QString& path);
33
34private:
35 void setupAudio(GBAAudio* audio);
36
37 QImage m_drawContext;
38 AudioDevice* m_audioContext;
39 GBAThread m_threadContext;
40 GBAVideoSoftwareRenderer* m_renderer;
41
42 QFile* m_rom;
43 QFile* m_bios;
44};
45
46}
47
48#endif