This site is no longer active and is available for archival purposes only. Registration and login is disabled.

StylusMove problems


StylusMove problems

Postby golan_trevize_x » Dec 14, 2003 @ 11:56pm

Hey all,

I know this is a topic that has numerous posts in the past, but my problem seems a little different.

In order to provide an alternative to the dodgy d-pad on my pocket pc, I am implementing a "directional disc" control, where the user holds the stylus inside a visible circle on the screen and moves it around. This means that the stylus is held down continuously for some time.

Anyway, I can observe the usual drop in performance when the stylus is held down, but my bigger problem is that frequently the stylus input events will just stop happening for a couple of seconds. During that period, the stylus can be moved around or lifted off the screen, and no events will occur. Is something being overloaded?

I'd appreciate any help,

Nathan
golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Postby ppcStudios » Dec 15, 2003 @ 12:53am

First, be sure that you're not simply stalling in part of your program. If you're using the single threaded application framework, its not too hard to lose stylus events - especially if you're doing alot of AI processing. You may also want to look into using the multi-threaded framework because the stylus events will be much more responsive.
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Postby golan_trevize_x » Dec 15, 2003 @ 1:16am

Yeah, the program is not stalling - I have animation that continues to run during this "dead period" of stylus input, so the ProcessNextFrame event is still working properly.

I haven't looked into the multi-threaded framework yet - I've been too scared of all the memory problems that can happen with a multi-threaded app - but I may have to give it a try.

Is there any documentation on how I might begin?

Thanks,
Nathan
golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Postby ppcStudios » Dec 15, 2003 @ 2:47am

G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Postby golan_trevize_x » Dec 15, 2003 @ 3:20am

Thanks for your help here dude,

The device is the Toshiba e740 :roll:, yeah I know, I'm seriously ruing the purchase now, but it was the most exciting PPC to go for at the time.

I haven't tested on the desktop yet because I haven't bought VC++. But that would be a good idea to test that.

I am using the StylusMove event to record the current position, but the processing for this control I made is only done once per frame, and only happens if we know the stylus is down. The problem is that the StylusMove event, along with the other two, just doesn't happen for a couple of seconds.

The way this is happening, it really strikes me like it wouldn't happen on the desktop. It seems like some kind of performance bottleneck or something. Like when your desktop PC sometimes stops listening to the keyboard and churns away for a while.

The thing is, I'm pretty sure I'm well over the target frame rate, so it's not dropping below ever.

Nathan
golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Postby ppcStudios » Dec 15, 2003 @ 4:07am

If you haven't tried already, load the Simple demo that comes with GD to see if the problem is inherent with your device. There is always the possibility that your hardware has problems (remote possibility).

Are you running anything in the background that might be sucking up the events? I presume you've tried debugging directly on the device. If not, you might try that to see if the inherent delays in the debugger free up the message pump. That may lead you to a solution if it does.

I think Johan was using the e7xx device for GD testing at one time. I'm sure if there was a problem with the stylus move events he would have seen it during testing.
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Postby golan_trevize_x » Dec 15, 2003 @ 11:12am

OK, well I just turned on my PPC again and it's not happening. I think it just needed a reset! :roll:

Sorry about that!!
golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Postby golan_trevize_x » Dec 15, 2003 @ 11:09pm

golan_trevize_x
pm Member
 
Posts: 67
Joined: Nov 23, 2001 @ 7:36pm
Location: Melbourne, Australia


Postby denthorq » Dec 16, 2003 @ 12:15am

It's worth the wait...
User avatar
denthorq
pm Insider
 
Posts: 447
Joined: Apr 18, 2003 @ 9:15pm
Location: USA-PHILIPPINES


Postby ppcStudios » Dec 16, 2003 @ 12:50am

G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum