Current desktop resolution
BlitzMax Forums/BlitzMax Beginners Area/Current desktop resolution
| ||
Is there a way to get the current desktop resolution in blitzmax? i can't see any way in the docs. Cheers Charlie |
| ||
Yup. |
| ||
I get this message when trying to use the module /usr/bin/ld: table of contents for archive: /Users/c-knight/Desktop/BlitzMax/mod/desktopext.mod/desktopext.release.macos.ppc.a is out of date; rerun ranlib(1) (can't load from it) collect2: ld returned 1 exit status Build Error: Failed to link /Users/c-knight/Desktop/BlitzMax/tmp/untitled1.app/Contents/MacOS/untitled1 Process complete |
| ||
but it seems to work ok on windows. Cheers Charlie |
| ||
Hmm...Have you tried rebuilding the module? |
| ||
Does the grab desktop pixmap thing work on all platforms? |
| ||
Desktop.Width Desktop.Height ? |
| ||
I just want to make it clear that I didn't write the above module, it was written by d-bug. AD, I believe the grab desktop function is Win32 only. JB, only if you have MaxGUI. The module allows you to get the desktop's colour depth too. :o) |
| ||
hehe, it's living again... :) DesktopPixmap, DesktopMouseX and DesktopMouseY are Win32 only, AngelDaniel. I can't help you with that problem, jkrankie. The OSX part was written by hamZta. cheers |
| ||
FYI: I just grabbed the DesktopExt.Mod written by D-Bug to query the desktop width/height (I don't have MaxGui) and it appears to be working great! Thanks D-Bug! |
| ||
D-Bug: The only suggestion I can make is a simple function to return the desktop ratio, granted it's trivial but since you have all of the other cool functions, why not? :) Thanks again for creating this mod. |
| ||
I get this message when trying to use the module /usr/bin/ld: table of contents for archive: /Users/c-knight/Desktop/BlitzMax/mod/desktopext.mod/desktopext.release.macos.ppc.a is out of date; rerun ranlib(1) (can't load from it) collect2: ld returned 1 exit status Build Error: Failed to link /Users/c-knight/Desktop/BlitzMax/tmp/untitled1.app/Contents/MacOS/untitled1 Process complete You may have to rebuild the module before you can use it. I seem to remember having to do this myself, although it was a long time ago. Also, check it's in the correct folder. D-Bug: The only suggestion I can make is a simple function to return the desktop ratio, granted it's trivial but since you have all of the other cool functions, why not? :) Thanks again for creating this mod. Local ratio:Float=DesktopWidth/DesktopHeightThat's just how trivial it is. Admittedly, it does assume that the user has their desktop at a square pixel resolution and not something like 1280x1024 on a 4:3 monitor. But then, that's their fault ;o) |
| ||
FYI: I just grabbed the DesktopExt.Mod written by D-Bug to query the desktop width/height (I don't have MaxGui) and it appears to be working great! Well, if anything was wrong with it, he's had a year to fix it since this thread was started. |
| ||
MGE: No Problem. ;) Since I'm on Mac too, I can confirm, that it is working well with OSX. Ratio is a rather useless feature, but why not... cheers ~edit~ Find the new version here! Now with DesktopRatio() to get the aspect ratio of the current desktop. It will return strings like "4:3", "16:10" or whatever your ratio is. ;) cheers^2 |
| ||
How reliable is the DesktopHertz function. Any guarantee it will return the true refresh rate of the monitor across all the various video cards and drivers? Or is it one of those things were the driver lies!?! |
| ||
It's an API-Call, so i give no guarantee for it, but in the past two years there where no issues reported with this function. |