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



Users browsing this thread: 1 Guest(s)