all repos — mgba @ f420232bbf7c487f3432edeb1f01e1c6c0af3a81

mGBA Game Boy Advance Emulator

src/platform/commandline.h (view raw)

 1#ifndef COMMAND_LINE_H
 2#define COMMAND_LINE_H
 3
 4#include "common.h"
 5
 6enum DebuggerType {
 7	DEBUGGER_NONE = 0,
 8#ifdef USE_CLI_DEBUGGER
 9	DEBUGGER_CLI,
10#endif
11#ifdef USE_GDB_STUB
12	DEBUGGER_GDB,
13#endif
14	DEBUGGER_MAX
15};
16
17struct StartupOptions {
18	int fd;
19	const char* fname;
20	int biosFd;
21	int patchFd;
22	int logLevel;
23	int frameskip;
24	int rewindBufferCapacity;
25	int rewindBufferInterval;
26
27	enum DebuggerType debuggerType;
28	int debugAtStart;
29};
30
31struct SubParser {
32	const char* usage;
33	int (*parse)(struct SubParser* parser, int option, const char* arg);
34	const char* extraOptions;
35	void* opts;
36};
37
38struct GraphicsOpts {
39	int multiplier;
40	int fullscreen;
41	int width;
42	int height;
43};
44
45int parseCommandArgs(struct StartupOptions* opts, int argc, char* const* argv, struct SubParser* subparser);
46void usage(const char* arg0, const char* extraOptions);
47
48void initParserForGraphics(struct SubParser* parser, struct GraphicsOpts* opts);
49struct ARMDebugger* createDebugger(struct StartupOptions* opts);
50
51#endif