diff options
author | John Willis | 2010-09-07 14:17:31 +0000 |
---|---|---|
committer | John Willis | 2010-09-07 14:17:31 +0000 |
commit | fd407eeca3f2d50bc1a005bbcfd171369daa4f5f (patch) | |
tree | 187d262fca4340c1423a9bab6b99b54dc3bb0df0 /backends/platform/gp2xwiz/gp2xwiz-hw.cpp | |
parent | 532663c742150b341de22a65da4fd761da6f497a (diff) | |
download | scummvm-rg350-fd407eeca3f2d50bc1a005bbcfd171369daa4f5f.tar.gz scummvm-rg350-fd407eeca3f2d50bc1a005bbcfd171369daa4f5f.tar.bz2 scummvm-rg350-fd407eeca3f2d50bc1a005bbcfd171369daa4f5f.zip |
GP2XWIZ: Refactor backend.
* Add support for TouchScreen 'Tap Modes'
Left Click, Right Click and Hover.
* Rename OSystem_GP2XWIZ to OSystem_GPH to
start the work on supporting a unified
backend codebase for the GP2X, Wiz and
Caanoo.
* Sort out bugs in Caanoo input code.
* Rework GP2XWiz input code to support
switching new TouchScreen modes.
svn-id: r52619
Diffstat (limited to 'backends/platform/gp2xwiz/gp2xwiz-hw.cpp')
-rw-r--r-- | backends/platform/gp2xwiz/gp2xwiz-hw.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp index bc1aa00ce4..f7cc716df0 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp @@ -82,3 +82,28 @@ void mixerMoveVolume(int direction) { } } /* namespace WIZ_HW */ + +namespace GPH { + +enum { + /* Touchscreen TapMode */ + TAPMODE_LEFT = 0, + TAPMODE_RIGHT = 1, + TAPMODE_HOVER = 2 +}; + +int tapmodeLevel = TAPMODE_LEFT; + +void ToggleTapMode() { + if (tapmodeLevel == TAPMODE_LEFT) { + tapmodeLevel = TAPMODE_RIGHT; + } else if (tapmodeLevel == TAPMODE_RIGHT) { + tapmodeLevel = TAPMODE_HOVER; + } else if (tapmodeLevel == TAPMODE_HOVER) { + tapmodeLevel = TAPMODE_LEFT; + } else { + tapmodeLevel = TAPMODE_LEFT; + } +} + +} /* namespace GPH */ |