-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhandlestuffsnesclassic.h
59 lines (49 loc) · 1.91 KB
/
handlestuffsnesclassic.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef HANDLESTUFFSNESCLASSIC_H
#define HANDLESTUFFSNESCLASSIC_H
#include <QSignalSpy>
#include "handlestuff.h"
#include "snesclassicstuff/stuffclient/stuffclient.h"
class HandleStuffSnesClassic : public HandleStuff
{
public:
HandleStuffSnesClassic();
void setControlCo(StuffClient* client);
void setShortcutLoad(quint16 shortcut);
void setShortcutSave(quint16 shortcut);
QByteArray getScreenshotData();
quint16 shortcutLoad();
quint16 shortcutSave();
bool hasScreenshots();
bool hasShortcutsEdit();
bool hasMemoryWatch();
void startMemoryWatch();
void stopMemoryWatch();
void controllerSaveState();
void controllerLoadState();
protected:
bool saveState(bool trigger);
void loadState(QByteArray data);
bool needByteData();
bool saveState(QString path);
bool loadState(QString path);
bool hasPostSaveScreenshot();
bool doScreenshot();
private:
StuffClient* controlCo;
QByteArray lastLoadMD5;
QByteArray screenshotData;
quint16 saveShortcut;
quint16 loadShortcut;
uint fileReceivedSize;
bool expectingSaveFile;
bool controllerStateTrigger;
QSignalSpy* commandSpy;
void runCanoe(QStringList canoeArgs);
QStringList getCanoeExecution();
void killCanoe(int signal);
void removeCanoeUnnecessaryArg(QStringList &canoeRun);
bool mySaveState(bool trigger, bool noGet);
void myLoadState(QByteArray data, bool noPut);
bool fakeWaitForCommand(QByteArray cmd, unsigned int timeout = 200);
};
#endif // HANDLESTUFFSNESCLASSIC_H