Touch Screen Sdl 1.3


frozen

Still Fresh
Joined
Jul 20, 2009
Messages
36
Hello

How can i use the touch screen of the Wiz? I thought sdl sends me mouse events on touch events, but it doesn't.

Thanks,
frozen
 
frozen said:
Hello

How can i use the touch screen of the Wiz? I thought sdl sends me mouse events on touch events, but it doesn't.

Thanks,
frozen

I didnt add controls to SDL 1.3 if they dont work automatically, which I dont think they do. For the demos I ended up looking at button controls directly, but that doesnt help with touchscreen.
 
Last edited by a moderator:
Hi

Thanks for the quick answer. Are you planning to add touch screen support to 1.3? Or do i have any other possibility to grab tocuh events?

Thanks,
frozen
 
Is this why we've got some sort of touchscreen support on some of your ports Pickle?

Neil L said:
el_capitan said:
While mapping buttons to various functions in hhexen2, I mapped a function to the touchscreen (center view). It occured to me that if the touchscreen were divided up into four separate areas, then a press in each of these areas could have a different key-mapping. You wouldn't be able to press more than one of these at a time, however they would be adequate for look up, look down, fly up/down or weapon/item cycling type commands.Is this possible with Wiz?
I've noticed this with the touchscreen also, I can't see why it wouldn't work. (If you move the stylus around you get a bit of movement, so there's more there than just a tap for 'mouse1')
If the touchscreen was divided diagonally into 4 triangles (top, right, left & bottom) and bit in the centre (all mapped to keypresses) it would be perfect as we're struggling for buttons on these games.
(This would give us an extra 5 'keys' to map from the game's options screen. (e.g. for 'look up', 'look down', 'look centre', 'inv. left' & 'inv. right')
The touchscreen works with prboom, hheretic, hhexen, hexen 2, ioquake2 (but not eduke32, quake 1, rise of the triad or wolf4sdl)

Cheers, Neil

Edit: I was also thinking, could a shift button/s be added? (To help with the lack of buttons)

e.g.
'Dpad up' coded to emulate button press 'a' mapped (from the game's options menu) to 'walk forward'
'L + Dpad up' coded to emulate button press 'b' mapped (from the game's options menu) to 'look up'
'R + Dpad up' coded to emulate button press 'c' mapped (from the game's options menu) to 'weapon up'
'Dpad right' coded to emulate button press 'd' mapped (from the game's options menu) to 'turn right'
etc.

Cheers again, Neil

Thanks, Neil
 
Last edited by a moderator:
SDL 1.2 (same with the gp2x version) takes raw touchscreen data and turns them into SDL mouse events, thats why some programs seem to have touchscreen support. The touchscreen acts like a mouse according to SDL.
Im not currently planning to add this support to 1.3, the right way to add it could be to look at 1.2 source learn how its done. Learn 1.3 and fit the 1.2 code in the best it can be.
 
frozen said:
Where can i find the source code of sdl 1.2?

http://sourceforge.n...tar.gz/download
(kernel source is there too)

Thanks Orkie!

Edit: Hmm im not seeing anything wiz specific for anything control related.

Edit2: I see the joystick stuff, but nothing specific for touchscreen. I think its accessed through tslib
 
Last edited by a moderator:
Ok i think i know what needs to be done.
In SDL 1.2/3 there a section for fbcon driver, this contains code for tslib. This is how the touchscreen is supported "out of box". Meaning no special changes just for the gp2x/wiz. In order to use the new opengles I based the wiz work off Cpasjuste pandora driver, which has no control support.

So basically the fbcon tslib stuff needs to be added into the SDL_pandora_events.c, that should be a good starting point.
 
Back
Top