cmd line parsing fixes, non-.smc roms allowed
[drnoksnes] / platform / platform.h
1 #ifndef _PLATFORM_H_
2 #define _PLATFORM_H_
3
4 #include "port.h"
5
6 // Configuration and command line parsing
7 void S9xLoadConfig(int argc, const char ** argv);
8 void S9xUnloadConfig();
9 void S9xSetRomFile(const char * file);
10 extern struct config {
11         /** Unfreeze from .frz.gz snapshot on start */
12         bool snapshotLoad;
13         /** Freeze to .frz.gz on exit */
14         bool snapshotSave;
15         /** Create fullscreen surface */
16         bool fullscreen;
17         /** Using xsp (thus take care of doubling coordinates where appropiate) */
18         bool xsp;
19         /** Audio output enabled */
20         bool enableAudio;
21         /** Speedhacks file to use */
22         char * hacksFile;
23         /** Current scancode->joypad mapping */
24         unsigned short joypad1Mapping[256];
25         unsigned char action[256];
26         /** If true, next time the main loop is entered application will close */
27         bool quitting;
28 } Config;
29
30 // Video
31 void S9xVideoToggleFullscreen();
32 void S9xVideoOutputFocus(bool hasFocus);
33
34 // Audio output
35 void S9xInitAudioOutput();
36 void S9xDeinitAudioOutput();
37 void S9xAudioOutputEnable(bool enable);
38
39 // Input actions
40 #define kActionNone                                             0
41 #define kActionQuit                                     (1U << 0)
42 #define kActionToggleFullscreen         (1U << 1)
43
44 void S9xDoAction(unsigned char action);
45
46 #endif