Latest Files |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
File Info |
Browsing as Guest |
|
|
Simpler touchscreen example |
|
|
This is yet another touch-screen sample program. Why did I make this when there are already a couple out there? Looking at the other sample code, I thought the touch screen was harder to use than it is. It's actually very easy, which this code hopefully illustrates.
This code is in plain C and uses SDL's mouse routines to talk to the touch screen -- thus touchscreen code can be tested on a PC with a mouse. It can be dynamically linked with the official GP2X SDK to produce a small binary that works on either the F100 or the F200 with GPH firmware. I have tested the resulting program on an F100 with firmware 2.0.0 and an F200 with firmware 4.0.0. On the F100, the program simply doesn't get mouse events. Everything else works as expected. I have not tested the dynamic executable on Open2x firmware.
I've included a script which will build the example using either the GP2X SDK or the Open2x toolchain, a README explaining build and link issues, and a pre-built binary.
|
|
Name: |
gp2x_touch-1.0.zip |
Date: |
02/06/2008 |
Size: |
48.4 KB |
Version: |
1.0 |
Author: |
Micah Stetson |
Website: |
|
Downloads: |
781 |
Sourcecode URL: |
|
Licence: |
|
|
|
|
|
Operating Systems: |
gp2x F100 gp2x F200
|
|
|
Connection |
Download Time |
56k Modem |
8.8 secs |
128k ISDN |
3.7 secs |
256k Cable/DSL |
1.8 secs |
512k Cable/DSL |
0.9 secs |
1mbit Link |
0.5 secs |
|
|
|
|
|
Download |
Please note: The comment section is NOT intended to ask for help. Please use the I need Help-Section at the boards.
8 Comments |
|
|
maybe your code is "simpler" because the other samples were done before the sdl support for the mouse binded with the touchscreen? :) |
|
|
No. I'm using the same SDK I installed in the middle of 2006 -- there is no touchscreen support in my development libraries. The essential thing that I'm doing differently from the other examples is dynamic linking.
I didn't mean to put down the other examples. Each one is showing something different. The original example shows how to get at the touchscreen using just the kernel interfaces under /proc. The second is a demo of SDL support for the touchscreen in an experimental version of Open2x. Mine shows how you can use SDL for the touchscreen while building with the tools you already have installed.
I called mine simpler because it doesn't require talking to /proc, it doesn't require updating your SDK, and it's a bit less code to read than the others. |
|
|
nice, anyway touchscreen was already simple, but any code of public domain is good, hope to see more interesting touchscreen games |
|
|
Very good. I looked into your sample to upgrade Fcalc, it made me understand what's the situation with the pad. Now for my 2-cents : it appears to me that it becomes even simpler since SDL just emulates the mouse from the touchscreen, so what has to be done is just ... nothing apart dealing with SDL mouse's events and it works. Trying to work with /dev/touchscreen/wm9xxx anymore is fatal beacause you get into concurrency with SDL stealing events. So to me upgrading to 4.1.0 is a must, even if some application will fail for a while; they will have to remove the ugly pad patch for 4.0.0, but dynamically-linked applications _may_ work unpatched.
|
|
|
I just tested the sample on firmware 4.0.2 and 4.1.1, and it works without any change. No kernel fix or recompile is necessary. |
|
|
The Collection Marts is platform where you can view latest designs about home décor and bedding. We have large range in different categories with finest fabric in cotton and silk. beautiful bed sheets , king size comforter sets , gul ahmed single bed sheets , fancy bed sheets with price , bedspread online shopping , cotton bed mattress online , cheap blankets , bed razai set , jersey sofa cover , lawn dresses online , velvet duvet cover You can view not only present trends but also view huge collection with reasonable price. The Collection Marts can provide fast service about delivery as well as customer support too. Our products are not only self-made but also, well connected with markets to ensure for possibility of available designs if client want to purchase. The Collection Marts customer support open 24/7 to guide their customers about material or product stuff. |
|
|
|
|
|
|
|
%%COMMENTFORM%% |
|
|
|
|
|
|
Powered by
CFiles 2.0-b10
Copyright © 2002-2003 Carrick Information
Technologies |
Most Downloads |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|