snes mouse support
[drnoksnes] / platform / platform.h
index 1837dd6..2a7e805 100644 (file)
@@ -1,14 +1,13 @@
-#ifndef _PLATFORM_SDL_H_
-#define _PLATFORM_SDL_H_
+#ifndef _PLATFORM_H_
+#define _PLATFORM_H_
 
 #include "port.h"
 
 // Configuration and command line parsing
 void S9xLoadConfig(int argc, const char ** argv);
+void S9xUnloadConfig();
 void S9xSetRomFile(const char * file);
 extern struct config {
-       char romFile[PATH_MAX + 1];
-       char hacksFile[PATH_MAX + 1];
        /** Unfreeze from .frz.gz snapshot on start */
        bool snapshotLoad;
        /** Freeze to .frz.gz on exit */
@@ -19,12 +18,24 @@ extern struct config {
        bool xsp;
        /** Audio output enabled */
        bool enableAudio;
+       /** Speedhacks file to use */
+       char * hacksFile;
+       /** Enable touchscreen controls */
+       bool touchscreenInput;
+       /** Current scancode->joypad mapping */
        unsigned short joypad1Mapping[256];
        unsigned char action[256];
+       /** If true, next time the main loop is entered application will close */
        bool quitting;
 } Config;
 
 // Video
+extern struct gui {
+       /** Size of the GUI Window */
+       unsigned short Width, Height;
+       /** Size of the rendering area, relative to window. 2x if Xsp on. */
+       unsigned short RenderX, RenderY, RenderW, RenderH;
+} GUI;
 void S9xVideoToggleFullscreen();
 void S9xVideoOutputFocus(bool hasFocus);
 
@@ -33,6 +44,11 @@ void S9xInitAudioOutput();
 void S9xDeinitAudioOutput();
 void S9xAudioOutputEnable(bool enable);
 
+// Input devices
+EXTERN_C void S9xInitInputDevices();
+void S9xDeinitInputDevices();
+void S9xInputScreenChanged();
+
 // Input actions
 #define kActionNone                                            0
 #define kActionQuit                                    (1U << 0)
@@ -40,7 +56,4 @@ void S9xAudioOutputEnable(bool enable);
 
 void S9xDoAction(unsigned char action);
 
-// Path things
-const char * S9xFiletitle (const char * f);
-
 #endif