X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=platform%2Fplatform.h;h=2cd176957fc5342d37f96c3e289bc4ccb8c2f829;hb=eed86017c48a6e264f5f3ee56bf686f787a85fd5;hp=d47f187f6268fb4ae08d81ce68be1b7be699c8eb;hpb=02ea2b4aee10098f26acde34cee19340fd8e4177;p=drnoksnes diff --git a/platform/platform.h b/platform/platform.h index d47f187..2cd1769 100644 --- a/platform/platform.h +++ b/platform/platform.h @@ -4,7 +4,7 @@ #include "port.h" // Configuration and command line parsing -void S9xLoadConfig(int argc, const char ** argv); +void S9xLoadConfig(int argc, char ** argv); void S9xUnloadConfig(); void S9xSetRomFile(const char * file); extern struct config { @@ -14,30 +14,40 @@ extern struct config { bool snapshotSave; /** Create fullscreen surface */ bool fullscreen; - /** Using xsp (thus take care of doubling coordinates where appropiate) */ - bool xsp; + /** Name of the scaler to use or NULL for default */ + char * scaler; /** Audio output enabled */ bool enableAudio; + /** Quit when the emulator window is deactivated */ + bool saver; /** Speedhacks file to use */ char * hacksFile; /** Enable touchscreen controls */ bool touchscreenInput; + /** Display touchscreen controls grid */ + bool touchscreenShow; + /** If true, next time the main loop is entered application will close */ + bool quitting; /** Current scancode->joypad mapping */ unsigned short joypad1Mapping[256]; + unsigned short joypad2Mapping[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. */ + /** Size of the (scaled) rendering area, relative to window. */ unsigned short RenderX, RenderY, RenderW, RenderH; + /** Scaling ratio */ + float ScaleX, ScaleY; } GUI; + +void S9xInitDisplay(int argc, char **argv); +void S9xDeinitDisplay(); void S9xVideoToggleFullscreen(); -void S9xVideoOutputFocus(bool hasFocus); +void S9xSetTitle (const char *title); // Audio output void S9xInitAudioOutput(); @@ -45,9 +55,11 @@ void S9xDeinitAudioOutput(); void S9xAudioOutputEnable(bool enable); // Input devices -EXTERN_C void S9xInitInputDevices(); +void S9xInitInputDevices(); void S9xDeinitInputDevices(); void S9xInputScreenChanged(); +void S9xInputScreenDraw(int pixelSize, void * buffer, int pitch); +void S9xProcessEvents(bool block); // Input actions #define kActionNone 0