X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=platform%2Fplatform.h;h=59f554942e08d568c71cc22b6825f14a8409021f;hb=6f057a6bc74f3f422ffc8f8439b1b205ebef66e5;hp=9a645a7f9df209afb851d5549ac00b2157a4b099;hpb=96b93ff5f9e7aef51e96b218ddb2c7a7f658b7da;p=drnoksnes diff --git a/platform/platform.h b/platform/platform.h index 9a645a7..59f5549 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 { @@ -18,17 +18,24 @@ extern struct config { 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; + /** Enable player 1 joypad */ + bool joypad1Enabled; + /** Enable player 2 joypad */ + bool joypad2Enabled; + /** Enable touchscreen controls (0 = no, 1 = for player 1, 2 = for player 2) */ + char 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 @@ -40,8 +47,11 @@ extern struct gui { /** 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(); @@ -49,19 +59,21 @@ 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 S9xInputScreenDraw(void * buffer, int pitch); +void S9xProcessEvents(bool block); // Input actions #define kActionNone 0 -#define kActionQuit (1U << 0) -#define kActionToggleFullscreen (1U << 1) -#define kActionQuickLoad1 (1U << 2) -#define kActionQuickSave1 (1U << 3) -#define kActionQuickLoad2 (1U << 4) -#define kActionQuickSave2 (1U << 5) +#define kActionQuit (1U << 0) +#define kActionToggleFullscreen (1U << 1) +#define kActionScreenshot (1U << 2) +#define kActionQuickLoad1 (1U << 4) +#define kActionQuickSave1 (1U << 5) +#define kActionQuickLoad2 (1U << 6) +#define kActionQuickSave2 (1U << 7) void S9xDoAction(unsigned char action);