all repos — mgba @ 1089285b45c1213fff87e0518fc45a327b8ede8b

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