Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More Mac Issues? _MOUSEHIDE & DESKTOPWIDTH
#2
_DESKTOPWIDTH is one of those GLUT library calls on Mac, and as such it's all wrapped up in the whole display queue lineup.  (Screen has to be initialized, draw, set, reported to the OS, and then polled to return the value.)   

I definitely wouldn't want to rely on calling it inside a loop of any sort, or else that loop is going to take a rather large performace hit, as you've noticed for yourself.

My recommendation?  At the start of a program:

DIM SHARED DTW AS LONG: DTW = _DESKTOPWIDTH

Unless you expect the user of resizing their desktop on you while the program is running, I'd ust get that information once, store it, and then go with that stored value throughout my program for Linux and Mac.
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mac print #file crlf? BlameTroi 5 339 02-16-2026, 08:42 PM
Last Post: BlameTroi
  Help: Issues with the _PRINTSTRING and _INPUTBOX$ functions in QB64. qbfans 2 374 02-13-2026, 06:07 AM
Last Post: qbfans
  Mac debugger not connecting, a user error! BlameTroi 0 110 02-07-2026, 06:18 PM
Last Post: BlameTroi
  Mac current release sigabrt BlameTroi 3 234 02-05-2026, 02:26 PM
Last Post: a740g
  Joysticks on a Mac, _DEVICEINPUT() NakedApe 15 1,739 01-01-2026, 04:05 PM
Last Post: pmackay

Forum Jump:


Users browsing this thread: 1 Guest(s)