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 touchscreen controls */
26 bool touchscreenInput;
27 /** Display touchscreen controls grid */
29 /** If true, next time the main loop is entered application will close */
31 /** Current scancode->joypad mapping */
32 unsigned short joypad1Mapping[256];
33 unsigned short joypad2Mapping[256];
34 unsigned char action[256];
39 /** Size of the GUI Window */
40 unsigned short Width, Height;
41 /** Size of the (scaled) rendering area, relative to window. */
42 unsigned short RenderX, RenderY, RenderW, RenderH;
47 void S9xInitDisplay(int argc, char **argv);
48 void S9xDeinitDisplay();
49 void S9xVideoToggleFullscreen();
50 void S9xSetTitle (const char *title);
53 void S9xInitAudioOutput();
54 void S9xDeinitAudioOutput();
55 void S9xAudioOutputEnable(bool enable);
58 void S9xInitInputDevices();
59 void S9xDeinitInputDevices();
60 void S9xInputScreenChanged();
61 void S9xInputScreenDraw(int pixelSize, void * buffer, int pitch);
62 void S9xProcessEvents(bool block);
66 #define kActionQuit (1U << 0)
67 #define kActionToggleFullscreen (1U << 1)
68 #define kActionQuickLoad1 (1U << 2)
69 #define kActionQuickSave1 (1U << 3)
70 #define kActionQuickLoad2 (1U << 4)
71 #define kActionQuickSave2 (1U << 5)
73 void S9xDoAction(unsigned char action);