![]() ![]() Public static DisplayMode getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, int minBPP, int maxBPP,ĭisplayMode modes = () * maxFreq the maximum display frequency in Hz * minFreq the minimum display frequency in Hz * maxHeight the maximum display resolution in pixels * maxWidth the maximum display resolution in pixels * minHeight the minimum display resolution in pixels * minWidth the minimum display resolution in pixels * If any given criterium is specified as -1 then it is ignored. * Determine the available display modes that match the specified minimum and maximum criteria. Private static final boolean DEBUG = false Here’s a nifty bit of code in the SPGL which does this for you: ![]() Only when everything has failed should you call Sys.alert() and inform the user that something is awry. Then you should sort your display modes in order of preference and then try them all, one at a time, until one works. It says in our not-very-clear specification that we cannot guarantee that every mode in the list of returned modes is valid which is why we can throw an Exception on setDisplayMode().įirst you should filter out any unnacceptable modes. Actually what you should be doing is trying several modes out one after the other.
0 Comments
Leave a Reply. |