Keen eye DGuy, I'll see if I can try this out. I still have to check EnumDisplaySettingsEx, but this seems pretty much exactly what I could use to have proper result.
Since I'm quite positive that Blitz3D is 60hz only, I think it's going to be quitre easy to actually pass through the valid modes. Here's the test code for 60hz and 16M colors only:
It looks pretty much like what you get when you do this sort of thing, which only uses Blitz3D commands:
Since I'm quite positive that Blitz3D is 60hz only, I think it's going to be quitre easy to actually pass through the valid modes. Here's the test code for 60hz and 16M colors only:
Graphics 1024,768,32,2 devmode% = CreateBank (200) mode% = 0 rc% = 1 modes_in_page% = 0 entries_per_line% = 0 While rc PokeShort(devmode,36, 200) rc% = api_EnumDisplaySettings (0, mode%, devmode%) BitsPerPel% = PeekShort (devmode, 104) PelsWidth% = PeekInt (devmode, 108) PelsHeight% = PeekInt (devmode, 112) DisplayFrequency% = PeekShort (devmode, 120) If BitsPerPel >= 4 And DisplayFrequency > 1 Then Select BitsPerPel Case 4 : bppType$ = "16 " Case 8 : bppType$ = "256 " Case 16 : bppType$ = "65K " Case 24, 32: bppType$ = "16M " Default : bppType$ = "" End Select If DisplayFrequency = 60 And bpptype$ = "16M " Then entry$ = LSet$(Str$(mode),4) + bppType$ + Str$(PelsWidth) + "x" + Str$(PelsHeight) + " " + Str$(DisplayFrequency) + "hz" Write LSet$(entry$, 25) entries_per_line = entries_per_line + 1 : If entries_per_line = 5 Then entries_per_line = 0 : Print "" EndIf EndIf mode = mode + 1 Wend WaitKey() End
It looks pretty much like what you get when you do this sort of thing, which only uses Blitz3D commands:
Function Init_gfxmodes(no_16bit% = True) term\gfxmodes = 0 For mode_id% = 1 To CountGfxModes3D() If (no_16bit = True And GfxModeDepth(mode_id) = 32) or no_16bit = False Then term\gfxmodes = term\gfxmodes + 1 term\gfx[term\gfxmodes]\mode = mode_id term\gfx[term\gfxmodes]\width = GfxModeWidth(mode_id) term\gfx[term\gfxmodes]\height = GfxModeHeight(mode_id) term\gfx[term\gfxmodes]\depth = GfxModeDepth(mode_id) EndIf Next End Function