January 26, 2021, 05:20:02 AM

Author Topic: [bmx] Listing Available Graphics Modes by SillyPutty [ 1+ years ago ]  (Read 498 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : Listing Available Graphics Modes
Author : SillyPutty
Posted : 1+ years ago

Description : This will retrieve all graphics modes compatible with your vide card

Code :
Code: BlitzMax
  1. Strict
  2.  
  3. setgraphicsdriver glmax2ddriver()
  4.  
  5. Graphics 640,480,0
  6.  
  7. Global width
  8. Global height
  9. Global depth
  10. Global hertz
  11.  
  12. Global n = CountGraphicsModes()
  13.  
  14. While Not KeyDown(KEY_ESCAPE)
  15. SetOrigin 10,10
  16.  
  17. DrawText "Graphics modes available",10,10
  18.  
  19. SetOrigin 10,40
  20. For Local x# = 0 To n-1
  21. GetGraphicsMode(x,width,height,depth,hertz)
  22. DrawText "Mode: Width: " + width + " Height: " + height + " Depth: " + depth + " Hertz: " + hertz,10,10*x
  23. Next
  24.  
  25. Flip
  26. Cls
  27. Wend


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal