BASIC

Author Topic: Error reading screen/mouse coordinates  (Read 4887 times)

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Code: GLBasic [Select]
repeat
  mousestate mx,my,b1,b2
  print mx+"/"+my,0,0
  showscreen
forever

WebOS: X:13-306, Y:13-479  (should be 0-319,0-479)

Iphone 4: X:5-635, Y:0-939 (0-639, 0-959)

Ipgone 3: X:3-318, Y:0-470 (0-319, 0-479)

This is the min and max values I can get. It is noticeable on the WebOS and in the max-y on iphones.

Perhaps something introduced with setrotate?

Anyone can make more tests? GLB 10.013
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Error reading screen/mouse coordinates
« Reply #1 on: 2011-Jun-10 »
I fear that that's a design feature of the touch screens, that you have a frame of about 5 pixels that can't be accessed.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Error reading screen/mouse coordinates
« Reply #2 on: 2011-Jun-10 »
But on the webos it is almost a 10% of the screen size lost... and on the iphone, the botton size of the screen lost is huge, too...
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Error reading screen/mouse coordinates
« Reply #3 on: 2011-Jun-10 »
does it work on windows?

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Error reading screen/mouse coordinates
« Reply #4 on: 2011-Jun-10 »
Yes, in windows is fine.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Gary

  • Dr. Type
  • ****
  • Posts: 313
    • View Profile
Re: Error reading screen/mouse coordinates
« Reply #5 on: 2011-Jun-10 »
When you touch the screen a large part of your finger will be touching it. Does the touchscreen take an average and sense where the middle of the touch is and return that location? It would explain why its out slightly and cant detect the edges

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Error reading screen/mouse coordinates
« Reply #6 on: 2011-Jun-10 »
It could be, but on WebOS it makes impossible to move my sliders even near of x=0 position...

Can someone test this source on their WebOS device?
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

MrTAToad

  • Guest
Re: Error reading screen/mouse coordinates
« Reply #7 on: 2011-Jun-10 »
Will do!

MrTAToad

  • Guest
Re: Error reading screen/mouse coordinates
« Reply #8 on: 2011-Jun-10 »
The min X/Y for webOS is 13/13 - even outside the program, it cant detect anything other around there.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Error reading screen/mouse coordinates
« Reply #9 on: 2011-Jun-10 »
It would be nice to test with GLB 9.x...  :whistle:
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Error reading screen/mouse coordinates
« Reply #10 on: 2011-Jun-10 »
It could be really interesting if someone with enough knowledge creates a simple program in C/WebOS native to check if it is a WebOS/Pre problem or a GLB one...
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4143
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Error reading screen/mouse coordinates
« Reply #11 on: 2011-Jun-10 »
I'm busy at the mo, but I'm still using 9.XX and I have a PRE and a PRE2. I'll sort something out later and post details and .IPK if necessary/wanted.
I came. I saw. I played.

MrTAToad

  • Guest
Re: Error reading screen/mouse coordinates
« Reply #12 on: 2011-Jun-10 »
Its around 5/5 on Android...

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4143
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Error reading screen/mouse coordinates
« Reply #13 on: 2011-Jun-10 »
I can confirm that the values as seen above (ampos' first post) are accurate on WebOS devices - Pre1 and Pre2 using GLB v9.040 in portrait mode.
I came. I saw. I played.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Error reading screen/mouse coordinates
« Reply #14 on: 2011-Jun-11 »
Ian, perhaps I dont understand you, but on your 9.04 Webos X mouse is 0-319 or 13-306?

I am trying

Code: GLBasic [Select]
?ifdef WEBOS
        mx=(mx-13)*1.11111
?endif

check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE