Updated WebOS port with new features. Now Touchpad-friendly!

Subforum for discussion and help with ScummVM's WebOS port

Moderator: ScummVM Team

Post Reply
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Updated WebOS port with new features. Now Touchpad-friendly!

Post by TomFrost »

UPDATE: This is no longer an HP TouchPad-specific port, but an updated port for all WebOS users. Please let me know if you encounter any issues!

What is this?
This started out as a TouchPad-specific port, until I started getting tweets and messages from cellular webOS device-users who said they loved the improvements on those devices as well. Now it's offered for everything :). Many thanks for kayahr, m0ngr31 (nexapps), and WayneRSH's contributions, without which this update definitely wouldn't exist! You all rock my socks straight off.

Disclaimer
I touched the ScummVM source for the first time solely to build on the WebOS port for the Touchpad. I am in no way an expert on ScummVM, or a dedicated developer to the project. Generally I'm a pretty busy guy, so I'm keeping all my source public on Github just in case I get too bogged down to keep maintaining this. Just know that, while I've tested my builds on my own TouchPad and others have reported success on their other WebOS devices, there's no guarantee it won't destroy yours. Use at your own risk.

Improvements in this fork
In addition to higher resolution graphics with filtering and scaling support, there are significant changes to the control structure:
  • Flick two fingers downward for the menu
  • Flick two fingers upward for the keyboard
  • Flick two fingers left to emulate the Escape key
  • Flick two fingers right to toggle Touchpad Mode.
  • Flick three fingers right to toggle Auto-Drag Mode.
    • When this is on, put a finger on screen and hold still for half a second to start dragging.
    • Whether it's on or off, you can always double-tap and hold to start dragging, just like you would on a computer trackpad.
  • Flick three fingers down to pause and unpause (forgive the spacebar message)
  • Tap with one finger to click normally.
  • Tap a second finger with one already touching the screen for a right-click.
  • Tap a third finger with two already on screen for a middle-click.
Touchpad Mode is what you might be used to form the old WebOS port. This is now OFF by default. When on, you move the finger on the screen, and the mouse pointer moves relative to it -- just like using a laptop trackpad.

When Touchpad Mode is OFF (default) the pointer will move to exactly where you tap, so tapping on an object clicks that object. If you put your finger on the screen and slide it around, you can hover over objects on the screen (useful to see what they are) without risking clicking on them.

Auto-Drag Mode is useful for games like Curse of Monkey Island and Full Throttle that require you to hold down the mouse button to access the possible actions. You can still put your finger on screen and immediately slide it around to hover over things without clicking.


Where/how to get it
The TouchPad package (v1.4.0000) is here: http://www.seriouslyslick.com/scummvm/c ... mohawk.ipk

By far the easiest way to install this is by putting Preware on your device, and simply tapping the above link from your TouchPad browser. If you need another method, the great Google knows all.


Want to get involved with the source?
Fork me (or the official scummvm repo, add mine as an external, pull it into a branch, and merge it with your branch/master if you know what you're doing with Git), follow the instructions here to build, and ignore flac if it won't compile (just use the --disable-flac parameter when you ./configure -- thanks md5!). Have fun!
Last edited by TomFrost on Mon Oct 03, 2011 3:24 am, edited 9 times in total.
User avatar
WayneRSH
Posts: 5
Joined: Mon Sep 05, 2011 9:41 pm

Post by WayneRSH »

Hi TomFrost and thanks for your work !

I wanted to try to compile something for my brand new TouchPad, for the fun of it, and I started with ScummVM, based on your git repo, so thanks again for that !

I did some quick modifications of your code, but I'm way too lazy to create a github account. :D
So, I'm just gonna link the file I've touched. Feel free to do whatever you want with it !

But before that, please forgive me for my ugly code :oops:, I did that just to test and have fun with the SDK.
But hey, it's kinda working (on my TouchPad only, I don't have any other webOS platform to test), so if it can help you gain some time, that will be enough for me.

Things I've implemented :
  • The cursor goes where you tap and clicks. When you drag, it follows your finger.
    It can be quite annoying in games like Sam & Max, as you have your finger on the cursor and can't easily figure out what's the function you've selected..)
    Could shift the cursor a bit, to put it on the top left of the finger for example.
  • Right click : hold first tap, then tap with another finger, and you've got your right click !
  • Middle click : hold 1, hold 2, tap 3 :o
  • Two fingers swipes for the menus and escape key (instead of one, to avoid unwanted menus when playing, and 60% of the screen instead of 90%) :
    • swipe up to bring the keyboard
    • swipe down to bring ScummVm menu
    • swipe left or right for the Escape key
The source file : deleted
Git : https://github.com/WayneRSH/scummvm
The IPK : http://waynersh.free.fr/scummvm/com.git ... 05_all.ipk

Hope this helps !
If not, well, I had fun anyway. :D

(And sorry for my bad English, I'm French...)
Last edited by WayneRSH on Tue Sep 06, 2011 11:31 pm, edited 1 time in total.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

Beautiful, Wayne! The multitouch was exactly what I needed to see! I'll work on implementing that into mine, and making it toggle-able so you can choose between the mouse modes :)
phunimator
Posts: 58
Joined: Mon Jun 01, 2009 1:03 pm
Location: London

Post by phunimator »

Hi there,

Just tried WayneRSH's build and it is working fantastically! The multitouch menu's and escaping is very accurate and easy to trigger :) Thank you!!

Also I am liking the direct cursor touch and click, it is working well for games like Monkey Island. I look forward to the tog-gable controls from TomFrost.

On another note, I was wondering is a left-click + hold could be implemented some how as an option? As you may know, games like Curse of Monkey Island use an option where you have to click and hold the left mouse button to bring up another set of options, in the game it is a Verb coin that lets you pick specific actions where you just slide to where you want, and then let go of the button to select. Currently this does not work in any of the tested IPK's, but would be great if it could make its way in there somehow.

Thanks again to both of you for your amazing work!! :)
User avatar
sev
ScummVM Lead
Posts: 2304
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

Hi TomFrost,

This seems like a nice port. Perhaps it would be good to merge with the main WebOS port, so your changes will be in the mainline?


Eugene
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

phunimator wrote: On another note, I was wondering is a left-click + hold could be implemented some how as an option?
Yessir! I'm a big fan of COMI and FT, which both use that scheme. I'm working on that now :) Initially, I'd like a two-finger slide to the right to toggle between Touchpad mode and Click-where-tapped, and a three-finger slide to the right to toggle between click and click+drag.
sev wrote:Hi TomFrost,

This seems like a nice port. Perhaps it would be good to merge with the main WebOS port, so your changes will be in the mainline?

Eugene
That would be fantastic! I'd definitely want to see this tested by someone with a non-TouchPad webos device, though, since I'm developing this within the same backend, but I'd be tickled if this went to mainline after I'm certain I didn't break anything with all other webos devices ;-)
Last edited by TomFrost on Tue Sep 06, 2011 11:41 pm, edited 1 time in total.
User avatar
WayneRSH
Posts: 5
Joined: Mon Sep 05, 2011 9:41 pm

Post by WayneRSH »

@phunimator : I've added the left-click + hold : just click and hold 0.5s without moving (well, less than 5 pixels), it should be good.
Tested on Full throttle (I believe it's the same mechanism as in the Curse of Monkey Island).

Package : http://waynersh.free.fr/scummvm/com.git ... 05_all.ipk
(You should delete my previous package, as I changed the name, if you don't want to be spammed with ScummVM icons)

Let me know if something's wrong, thx !


And as I was motivated tonight, I've created a github account, based on TomFrost's repo. \o/

https://github.com/WayneRSH/scummvm

@TomFrost : Tell me if you want me to push the file or something. Or just do whatever you want with this o/


[Edit] :
TomFrost wrote:
phunimator wrote: On another note, I was wondering is a left-click + hold could be implemented some how as an option?
Yessir! I'm a big fan of COMI and FT, which both use that scheme. I'm working on that now :)
Woops, sorry about that mate :|
But I'd like to see how you did that one ! I used a little "trick" with your queued event, so I'm pretty sure that you have a better solution !
Last edited by WayneRSH on Tue Sep 06, 2011 11:45 pm, edited 1 time in total.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

Nice, Wayne! Throw me a pull request and I'll merge your updates in :). One thing I want to improve on is the tracking of multiple fingers. Right now it gets a bit sketchy with the finger placements (example: put one finger at the right of the screen. Next, put another finger at the bottom of the screen. Now swipe the first finger to the left. You've just triggered the escape key), which I think we'll run into trouble with when we refine this a bit. But your code will go a looong way to getting this done!
User avatar
WayneRSH
Posts: 5
Joined: Mon Sep 05, 2011 9:41 pm

Post by WayneRSH »

Hm, I think I messed up with my git checkout, I can't commit..
(My first time with git :oops:)

I'll see that tomorrow, must go to sleep !

Here's the source file, if you wanna have a look, until I fix my git thing : http://waynersh.free.fr/scummvm/webossdl-events.cpp


(Hell, you're right about the multitouch, could lead to some problems, nice find :))

And good night.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

I pushed an update to my fork -- it still doesn't have the various mouse modes, but I did change how finger tracking works so that we have a much more accurate method of determining gestures. Now, a small flick left with two fingers is enough to press Escape (and it triggers when your fingers move far enough, not when they lift off the screen -- no guessing at the correct distance that way). Same with the menu and keyboard. I laid the framework for a flick right to change mouse modes, but for some reason my dialog is causing ScummVM to crash. Falling asleep as I type this, though, so I'll debug later ;-). Worst comes to worst, I'll trigger that on mouseup... but I don't want to if I don't have to.

No new build yet since this isn't stable, but it gives us a good starting point for gestures :)
phunimator
Posts: 58
Joined: Mon Jun 01, 2009 1:03 pm
Location: London

Post by phunimator »

Hi All,

Just wanted to say that Curse of Monkey Island works beautifully now :D Thanks so much guys! I really appreciate your work.

-Edit
Sorry just wanted to say that the build are used was WayneRSH's latest one.
User avatar
TomFrost
Posts: 178
Joined: Mon Apr 23, 2007 4:53 pm

Post by TomFrost »

Updated my fork -- same link as in the OP. Note the new controls :). I'll try to add the auto-drag toggle tomorrow.
jedinat
Posts: 7
Joined: Thu Sep 08, 2011 4:17 am

Post by jedinat »

The screen is squashed so there's black bars on top and bottom. When I turn on aspect ratio correction the image correctly fills the screen, but the touch controls won't work for the top and bottom.
shareef68
Posts: 3
Joined: Thu Sep 08, 2011 7:44 am

Post by shareef68 »

jedinat wrote:The screen is squashed so there's black bars on top and bottom. When I turn on aspect ratio correction the image correctly fills the screen, but the touch controls won't work for the top and bottom.
install internalz through preware then use internalz to delete the /media/internal/SummVM/scummvmrc file
User avatar
kyng-wu
Posts: 16
Joined: Tue Dec 19, 2006 2:21 pm
Location: Germany

Post by kyng-wu »

Great work ! Monkey Island on my Touchpad. <3
Post Reply