Author Topic: Sticky Anolog stick!  (Read 3474 times)

Offline shadowthief

  • bit
  • Posts: 3
    • View Profile
Sticky Anolog stick!
« on: March 24, 2012, 07:52:01 PM »
When I play Zelda OOT I will hold down the analog stick and press a button to make link move  or dodge, but then I would press any other button besides the anolog stick and the anolog stick moves instead and the buttons wont respond unless I hold down the analog stick and then press the button at the same time.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sticky Anolog stick!
« Reply #1 on: March 24, 2012, 09:31:22 PM »
How often does this happen, every time you use the analog stick?  Also, what device has the problem?
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline shadowthief

  • bit
  • Posts: 3
    • View Profile
Re: Sticky Anolog stick!
« Reply #2 on: March 25, 2012, 07:38:44 PM »
It happens almost every time i use the anolog stick and a button simultaneously. This happens on the Acer Iconia A100 using the ICS rom.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sticky Anolog stick!
« Reply #3 on: March 25, 2012, 08:16:35 PM »
This sounds similar to the multi-touch issue on Galaxy Nexus (a little different behavior, but that problem was related to not receiving pointer-up events as well, which this one sounds like too).  I'll have to write a custom test for you to run to see what's going on exactly, though.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline shadowthief

  • bit
  • Posts: 3
    • View Profile
Re: Sticky Anolog stick!
« Reply #4 on: March 25, 2012, 09:58:48 PM »
Ok ;)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sticky Anolog stick!
« Reply #5 on: March 28, 2012, 05:09:22 PM »
Here is that test app (sorry for the delay):

Verbose test

If you've installed any of the previous tests or the 1.99.5 core test, please uninstall them first before installing this one.  Grab the logcat after pressing on the virtual gamepad until you experience the problem

If you are not familiar with accessing the logs, I've posted instructions in this thread.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline stonebriar

  • bit
  • Posts: 2
    • View Profile
Re: Sticky Anolog stick!
« Reply #6 on: March 29, 2012, 08:35:08 PM »
OK here it is. If I did it wrong I'll do it again.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sticky Anolog stick!
« Reply #7 on: March 29, 2012, 09:00:42 PM »
I think the problem is happening because of this:

Code: [Select]
V/SDLSurface( 4158): ACTION_DOWN
V/SDLSurface( 4158):     Pointer 0 is down
V/SDLSurface( 4158): ACTION_POINTER_DOWN 1
V/SDLSurface( 4158): ACTION_POINTER_UP 0
V/SDLSurface( 4158): ACTION_UP or ACTION_CANCEL   <<--- (all pointers should be up at this point)
V/SDLSurface( 4158): ACTION_DOWN
V/SDLSurface( 4158):     Pointer 1 is down   <<--- (why is this pointer 1, not pointer 0?)
V/SDLSurface( 4158): ACTION_UP or ACTION_CANCEL

On most phones, once you release all pointers, the next one down is given an id of 0 (or a 1-up id on a couple phones).  Your device seems to be basing the id on something else (maybe the relevant positions of the last pointers), because it is switching around the id's (it gave a pointer-id of 1 instead of 0 or 2 as expected).  I'll have to think about this to see how it could cause problems based on the logic in my code (it is late here and my brain is not working well at the moment, haha).  I might post another test build for you to run tomorrow that also prints out the pointer positions so I can maybe see why it would use one pointer id versus another (I'm thinking it is based on pointer position).  I'm sure it will be a simple solution, I just can't think of it at the moment.  ;D
« Last Edit: March 29, 2012, 09:02:25 PM by Paul »
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline stonebriar

  • bit
  • Posts: 2
    • View Profile
Re: Sticky Anolog stick!
« Reply #8 on: April 03, 2012, 07:49:14 PM »
I'm beggining to think that it isn't the app itself causing the anolog problem but my tablet. When I play GTA 3 I also have the same sticky analog problem. Could it be my tablet that's causing this and not the app?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sticky Anolog stick!
« Reply #9 on: April 03, 2012, 08:33:05 PM »
I'll post that next test soon.  I just need to clean up the code from the cheats stuff I've been working on.  I'll try and post it for you tomorrow.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted