all repos — mgba @ ec1fc632b23749add411a2d9a9a4a32bd957a99c

mGBA Game Boy Advance Emulator

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

 1/* Copyright (c) 2013-2017 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_CORE_MANAGER
 7#define QGBA_CORE_MANAGER
 8
 9#include <QFileInfo>
10#include <QObject>
11#include <QString>
12
13struct mCoreConfig;
14struct VFile;
15
16namespace QGBA {
17
18class CoreController;
19class MultiplayerController;
20
21class CoreManager : public QObject {
22Q_OBJECT
23
24public:
25	void setConfig(const mCoreConfig*);
26	void setMultiplayerController(MultiplayerController*);
27	void setPreload(bool preload) { m_preload = preload; }
28
29public slots:
30	CoreController* loadGame(const QString& path);
31	CoreController* loadGame(VFile* vf, const QString& path, const QString& base);
32	CoreController* loadBIOS(int platform, const QString& path);
33
34signals:
35	void coreLoaded(CoreController*);
36
37private:
38	const mCoreConfig* m_config = nullptr;
39	MultiplayerController* m_multiplayer = nullptr;
40	bool m_preload = false;
41};
42
43}
44
45#endif