I got one question regarding the command "Set Display Mode".
I'm currently working on an Entity-Viewer for my game engine.
I'm heavily working with bbb GUI and whenever I resize the Window I use "Set Display Mode" to update the window to it´s new resolution.
This doesn't generate any problems with resolutions like 687x751 for example.
But if I want to maximize the window, which results in a resolution of 1920x1024, the program crashes.
If I try to set this resolution right at the start the program gives me "Runtime Error 1507 - Display using 32 bit is not supported by available hardware"
wtf?
What's the difference between 687x751 and 1920x1024?
EDIT:
Btw the program is set to compile with window mode.
EDIT:
Of course there's no difference if I try it with 16 bit Depth.
EDIT:
I just discovered that it works with a resolution of 1919x1024.
It also crashes with a resolution of 1919x1080.
The resolution 1919x1079 on the other hand is fine.
My Monitors maximum resolution is 1920x1080, so I always have to subtract 1.
It seems like resolutions of the monitors max resolution are crashing in windowed mode.
Seems like a bug to me.
In my understanding the maximum resolution of the monitor should be fine in windowed mode.
Maybe it's a Windows 7/Vista bug. I don't really remember if Windows XP still had a window border for maximized windows, but Windows 7 has not, but maybe that has nothing to do with it anyway.
EDIT:
This is my fix, but I still think it's a strange behavior.
PERFORM CHECKLIST FOR DISPLAY MODES
lastentry = CHECKLIST QUANTITY()
IF Game.Graphic.Resolution.Width = CHECKLIST VALUE A(lastentry)
DEC Game.Graphic.Resolution.Width, 1
ENDIF
SET DISPLAY MODE Game.Graphic.Resolution.Width, Game.Graphic.Resolution.Height, Game.Graphic.Depth, Game.Graphic.VSync, Game.Graphic.AntiAlias, 0
Since "Check Display Mode" can't be used in this windowed mode situation this is my only chance, I guess. I just have to hope it will always work as intended XD.
There is no additional check for windowed mode because the program will always be in windowed mode.