Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More Mac Issues? _MOUSEHIDE & DESKTOPWIDTH
#1
Well I encountered a couple other issues (on my Mac mini) that should probably be sniffed at to see if I'm crazy or what. Yesterday I was flummoxed by _MOUSEMOVEMENTX not reporting data beyond the edges of the desktop, and while I was messing with that I encountered another apparent bug. 

While polling for mouse feedback (DO WHILE MOUSEINPUT: cx = cx + _MOUSEMOVEMENTX: LOOP), I discovered that, if I wiggled my mouse around hard, the mouse pointer would reappear even though I had already used _MOUSEHIDE in the beginning of the program. I thought it must be the OS butting in, so I turned off "Wiggle Mouse to Show Pointer," but that didn't fix it, nor did sprinkling around a few more _MOUSEHIDEs. Not until I added 
_MOUSESHOW: _MOUSEHIDE into the relevant sub did the issue go away.  

One more. In trying to create a little onscreen gauge to show where the MouseMovementX position was within its limited range on my machine, I wrote one line that made my game grind to a halt - from ~450 FPS to 27 FPS. After plenty of head scratching, I found this wee formula was causing the problem:  g = INT((cx / _DESKTOPWIDTH) * _WIDTH). Specifically, dividing by _DESKTOPWIDTH killed the performance. When I replaced that command with 1920 (my desktop width) the problem went away. Now I'm thinking of making a CONST out of _DESKTOPWIDTH to fix it...

Weird stuff. I'm happy to provide the code that caused the wackiness. Thanks, Ted
Reply


Messages In This Thread
More Mac Issues? _MOUSEHIDE & DESKTOPWIDTH - by NakedApe - 02-14-2024, 05:28 PM



Users browsing this thread: 1 Guest(s)