Monitor crash?

BlitzMax Forums/BlitzMax Programming/Monitor crash?

Josepho(Posted 2009) [#1]
In some computers, my game makes that the screen turns completly black, seems that blitzmax has some problems with some kind of monitors, people who has tell me this error said to me that it happens in windowed mode and it shows a monitor frequency message. Anybody knows which can be the problem? The game doesnt crash, because the sounds and the music works and everything backs to the normality when they quit the game using a hotkey.

Thank you


xlsior(Posted 2009) [#2]
You can specify the refreshrate as part of the Graphics statement -- not all computers support all refreshrates: Especially LCD's will often only work at 60Hz.

When you create your screen, do you specify a Hz parameter?

If so, did you make sure that that particular graphics mode is actually available on that computer? (there's a command to show the list of graphics modes including refreshrates that's available on the PC. If it's not on that list, assume it won't work and don't try to change to it.)


Josepho(Posted 2009) [#3]
Graphics (800,600,0,0)

Graphics (800,600,16,0,0)

I use this code for the graphics :/


Josepho(Posted 2009) [#4]
Nobody knows anything about it? O_o


Brucey(Posted 2009) [#5]
Why not try 60 hz (the default) instead of zero.... maybe it will work better.


Brucey(Posted 2009) [#6]
And as xlsior mentions, you can call several functions to find valid modes on the computer

GraphicsModes()
GraphicsModeExists()

It might help you find a good match.


MGE(Posted 2009) [#7]
Specifying a non compatible number like "0" for the hz is supposed to trigger the internal gpu to find a suitable hz. I wonder why this is failing?

Are you specifying a graphics driver by any chance?


Jesse(Posted 2009) [#8]
I think that some if not all graphics card are not able to access the capabilities of the monitor. I seem to get that same problem while trying to access non standard graphics mode available on my nvidia graphics card with my monitor. I can go in to the nvida pannel and try all of the graphics modes available but about 20% of them do not work with my monitor. I know it is because some of the modes are not compatible with my lcd video monitor. Specially sence I have a list of modes abailable by my monitor. I think that sticking with standard modes like 1024x768x32 or 800 x 600x32 would reduce if not eliminate these problems. I don't know if there are also standard modes available for wide screen monitor but these modes should work on them also. I also noted that my nvidia card does not support 24 bit modes under certain resolutions. It supports 32 and 16 but not 24.


Josepho(Posted 2009) [#9]
So i should use always 60 hz isnt it? That should work always?

Im using now
graphics 800,600 for the windowed mode and graphics (800,600,16,60,0) to the full screen mode, this should fix my problems? I cant testing it properly


GfK(Posted 2009) [#10]
Your code (Graphics 800,600,16,0) is wrong.

You're setting Hz to 0 - ensuring that the screen is never drawn. Some hardware may pick that up and default to something that it supports, other hardware may not.

But the upshot of the matter is, your code is wrong. I wouldn't specify anything other than the width, height and color depth when setting a graphics mode. Let Hz default to 60.