6 // Configuration and command line parsing
7 void S9xLoadConfig(int argc, char ** argv);
8 void S9xUnloadConfig();
9 void S9xSetRomFile(const char * file);
10 extern struct config {
11 /** Unfreeze from .frz.gz snapshot on start */
13 /** Freeze to .frz.gz on exit */
15 /** Create fullscreen surface */
17 /** Name of the scaler to use or NULL for default */
19 /** Audio output enabled */
21 /** Quit when the emulator window is deactivated */
23 /** Speedhacks file to use */
25 /** Enable player 1 joypad */
27 /** Enable player 2 joypad */
29 /** Enable touchscreen controls (0 = no, 1 = for player 1, 2 = for player 2) */
30 char touchscreenInput;
31 /** Display touchscreen controls grid */
33 /** If true, next time the main loop is entered application will close */
35 /** Current scancode->joypad mapping */
36 unsigned short joypad1Mapping[256];
37 unsigned short joypad2Mapping[256];
38 unsigned char action[256];
43 /** Size of the GUI Window */
44 unsigned short Width, Height;
45 /** Size of the (scaled) rendering area, relative to window. */
46 unsigned short RenderX, RenderY, RenderW, RenderH;
51 void S9xInitDisplay(int argc, char **argv);
52 void S9xDeinitDisplay();
53 void S9xVideoToggleFullscreen();
54 void S9xSetTitle (const char *title);
57 void S9xInitAudioOutput();
58 void S9xDeinitAudioOutput();
59 void S9xAudioOutputEnable(bool enable);
62 void S9xInitInputDevices();
63 void S9xDeinitInputDevices();
64 void S9xInputScreenChanged();
65 void S9xInputScreenDraw(int pixelSize, void * buffer, int pitch);
66 void S9xProcessEvents(bool block);
70 #define kActionQuit (1U << 0)
71 #define kActionToggleFullscreen (1U << 1)
72 #define kActionQuickLoad1 (1U << 2)
73 #define kActionQuickSave1 (1U << 3)
74 #define kActionQuickLoad2 (1U << 4)
75 #define kActionQuickSave2 (1U << 5)
77 void S9xDoAction(unsigned char action);