AMOS:Bug Limit Mouse

From Amiga Coding
Jump to: navigation, search

Sometimes when you use Limit Mouse using either

Limit Mouse X1,Y1 To X2,Y2


Limit Mouse

it can cause a bug in AMOS Pro where the mouse is not limited correctly - the mouse refuses to go beyond halfway across the screen to the right, regardless of the values used for X1 and X2. If the mouse is moved upwards off the top of the screen to a certain point it appears at the bottom of the screen and doesn't move left or right, though it will disappear if you move the mouse downwards and reappear correctly at the top of the screen!

The fix for this is to use Limit Mouse _SCREEN_NUMBER before you use Limit Mouse with specific coordinates. Here's an example

Limit Mouse 0
Limit Mouse 128,50 To 128+319,296 : Rem hardware coords used to set limits as 0,0 to 319,246

Tested With

AMOSPro V2.00 uncompiled - has the bug
AMOSPro V2.00 compiled - not tested yet
AMOS V1.36 uncompiled - not tested yet
AMOS V1.36 compiled - not tested yet


  • Bug discovered by Lonewolf10 sometime before 2012
  • Bug tested/described by Lonewolf10 on 27 October 2012