all repos — mgba @ 12e5425b9b1f873dd70b4b2abc156556346fd2b1

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 frameskip;
22	int rewindBufferCapacity;
23	int rewindBufferInterval;
24
25	enum DebuggerType debuggerType;
26	int debugAtStart;
27};
28
29struct SubParser {
30	const char* usage;
31	int (*parse)(struct SubParser* parser, int option, const char* arg);
32	const char* extraOptions;
33	void* opts;
34};
35
36struct GraphicsOpts {
37	int multiplier;
38	int fullscreen;
39	int width;
40	int height;
41};
42
43int parseCommandArgs(struct StartupOptions* opts, int argc, char* const* argv, struct SubParser* subparser);
44void usage(const char* arg0, const char* extraOptions);
45
46void initParserForGraphics(struct SubParser* parser, struct GraphicsOpts* opts);
47struct ARMDebugger* createDebugger(struct StartupOptions* opts);
48
49#endif