*stretches fingers and begins madly typing out a new function*
here you go
function DetectAvailableResolutions()
minwidth=800
minheight=600
mindepth=16
perform checklist for display modes
i2=checklist quantity() : i3=0
dim TempResolutionList(i2) as ResolutionParameters
for i=1 to i2
w=checklist value a(i) // Width
h=checklist value b(i) // Height
d=checklist value c(i) // Depth
if w=>minwidth and h=>minheight and d=>mindepth
inc i3,1
TempResolutionList(i3).x=w // Width
TempResolutionList(i3).y=h // Height
TempResolutionList(i3).bit=d // Depth
endif
next i
dim ResolutionList(i3) as ResolutionParameters
for i=1 to i3
ResolutionList(i).X=TempResolutionList(i).x
ResolutionList(i).Y=TempResolutionList(i).y
ResolutionList(i).Bit=TempResolutionList(i).bit
next i
undim TempResolutionList()
endfunction
type ResolutionParameters
x as integer
y as integer
bit as integer
endtype
Simply call the function at any time. This function will find all available resolutions, but filter them down according to your specified minimum dimensions (i.e. don't show anything below 800x600, and must be at least 16bit colour mode)
Example
sync on : sync rate 60
DetectAvailableResolutions()
do
cls
xprint=0 : yprint=0
for i=1 to Array Count(ResolutionList(0))
text xprint*200,yprint*text height("O"),str$(ResolutionList(i).X)+"x"+str$(ResolutionList(i).Y)+" ("+str$(ResolutionList(i).Bit)+" bit)"
inc yprint,1 : i2=xprint : xprint=floor(i/20) : if i2<>xprint then yprint=0
next i
sync
loop