BlitzMax OG - 4K full screen fail

Started by therevills, January 10, 2025, 22:29:14

Previous topic - Next topic

therevills

Anyone got a monitor that runs a 4k res? 3840x2160?

One of my players is having issues with a BlitzMax OG (1.50) game and setting it to full screen (32bit) at that resolution, but the only one I have close to this runs at 3440x1440 but it runs okay at that.


DebugLog "Trying full screen at " + WindowWidth + "x" + WindowHeight + " 32bits..."
Hertz=60
If GraphicsModeExists(WindowWidth, WindowHeight, 32) Then
Local ms:Int = MilliSecs()
DebugLog "start"
OK = Graphics(WindowWidth, WindowHeight, 32, Hertz)
DebugLog "end = " + (MilliSecs() - ms)
Depth = 32
EndIf


The player was kind enough to supply the logs:


  • 10:03:51: WindowWidth  = 3840
  • 10:03:51: WindowHeight = 2160
  • 10:03:51: Trying full screen at 3840x2160 32bits...
  • 10:03:51: start
Then softlocks and the player has to use task manager to kill the game :(


On my monitor:

  • 09:11:45: WindowWidth  = 3440
  • 09:11:45: WindowHeight = 1440
  • 09:11:45: Trying full screen at 3440x1440 32bits...
  • 09:11:45: start
  • 09:11:45: end = 106


therevills

Runnable code if anyone care to test it for me please:

SuperStrict

?Win32
Extern "win32"
Function GetDesktopWindow:Int()
Function ReleaseDC(hwnd:Int, hdc:Int)
End Extern
?

Function ccGetDesktopSize:Int(width:Int Var, height:Int Var)
?win32
'by hamZta / d-bug from DesktopExtension 1.12
Local hwnd:Int = GetDesktopWindow()
Local hdc:Int = GetDC(hwnd)
If hdc = Null Then Return -1
width  = GetDeviceCaps(hdc, HORZRES)
height = GetDeviceCaps(hdc, VERTRES)
ReleaseDC(hwnd,hdc)
?
?MacOS
macGetDesktopSize(Varptr width,Varptr height)
?
Return 1 'success (probably)
End Function

Global WindowWidth:Int = 800
Global WindowHeight:Int = 600
Global DesktopWidth:Int = 0
Global DesktopHeight:Int = 0
Global Hertz:Int = 60
Global Depth:Int = 0

ccGetDesktopSize(DesktopWidth, DesktopHeight)

WindowWidth = DesktopWidth
WindowHeight = DesktopHeight
Local OK:TGraphics = Null
DebugLog "Trying full screen at " + WindowWidth + "x" + WindowHeight + " 32bits..."

If GraphicsModeExists(WindowWidth, WindowHeight, 32) Then
Local ms:Int = MilliSecs()
DebugLog "start"
OK = Graphics(WindowWidth, WindowHeight, 32, Hertz)
DebugLog "end = " + (MilliSecs() - ms)
Depth = 32
EndIf

Repeat
Cls
DrawLine(0, 0, WindowWidth, WindowHeight)
Flip
Until AppTerminate() Or KeyHit(KEY_ESCAPE)

Baggey

Hi, Ya mate it dont compile here!? is it Blitzmax or BlitmaxNG?
Running a PC that just Aint fast enough!? i7 4Ghz Quad core 32GB ram  2x1TB SSD and NVIDIA Quadro K1200 on 2 x HP Z24's . DID Technology stop! Or have we been assimulated!

Windows10, Parrot OS, Raspberry Pi Black Edition! , ZX Spectrum 48k, C64, Enterprise 128K, The SID chip. Im Misunderstood!

therevills

Thanks for trying Mr Baggey - It should compile with the OG BlitzMax (1.50).