Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Screen depth weird error...

Author
Message
Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 17th Jan 2013 16:15 Edited at: 17th Jan 2013 22:29
_______SOLVED________

Hello once again fellow DBpro'ers ... I have encountered an extremely annoying little wierd error in my latest project, basically all-of-a-sudden I get a runtime error when I try to launch my project saying that 32 bit is not supported by my display... it is... and its worked fine before? All I did was change some code, which should have no impact on it whatsoever, although now it does not work at all, even if I write it again as it was before? maybe I just need to restart my computer?

Thanks in advance!
//Anton
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Jan 2013 17:28
Code Please... your display setup and DBP IDE settings...

Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 17th Jan 2013 17:31
what is your screen resolution? I have had problems before with my projects.

my resolution was 1366x768 and I got the same error until I ran at resolution 1360x768.

try reducing the resolution just a touch and see if it changes anything.

I'm not a complete idiot -- Some parts are just missing.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jan 2013 17:32 Edited at: 17th Jan 2013 17:33
1) Do you at any point in your program use set display mode? Post the code.
2) What resolution is the application set to run in? (Can be found in a "project" tab somewhere, depending on which IDE you use)

Generally it is good practice to set the application to run in a resolution guaranteed to be supported by everyone (800x600x32 for instance), and then manually adjust it on start-up.

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Jan 2013 17:32
you have set a resolution that your monitor doesn't support

Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 17th Jan 2013 17:34 Edited at: 17th Jan 2013 17:38
Loading the graphic settings from an .ini file:



The ini file looks like this:



then I just call the function and set the settings like this:



Please note that it is not the encryption/decryption which is faulty, I get an error that 32 bit is not supported, not that the depth is an illegal number!
Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 17th Jan 2013 17:37
First of all, thanks for the help guys! Pick your answer to what you posted bellow:

@bendy boy
Sorry, but that is not true, my monitor is 1920x1080 and supports 32bit true colour... Its worked before, just now it does not?

@Thecomet
Posted

@Kezzla
Well, its worked all the time till now, I even ran it today a couple of times before I started getting the error.

@MrValentine
Posted
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Jan 2013 17:40
Quote: "@bendy boy
Sorry, but that is not true, my monitor is 1920x1080 and supports 32bit true colour... Its worked before, just now it does not?"

the error you get is shown when you run in non supported resolution.
What resolution is set in IDE settings?

Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 17th Jan 2013 17:44 Edited at: 17th Jan 2013 17:45
Quote: "
the error you get is shown when you run in non supported resolution.
"

I know... I know what the error means... What I am telling you is that my hardware does support 32 bit, and this resolution, and that this has worked before, even today, just a minute before I started getting the error.

Quote: "
What resolution is set in IDE settings?
"

You'll have to prompt me to where to look for that, im sorry. atm I'm using the

command to set the display.. mode XD basically it would look like this if you saw the values:
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Jan 2013 17:58 Edited at: 17th Jan 2013 17:59
Quote: "You'll have to prompt me to where to look for that, im sorry"

here


MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Jan 2013 18:06
Thanks Brendy

Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 17th Jan 2013 21:29 Edited at: 17th Jan 2013 21:29

Thanks guys for all the help!
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jan 2013 21:49
I'm going to assume your graphics card supports a 640x480 window.

Can you insert this code and see what it outputs?



Check if the values you get are compatible with your graphics card. It might be possible that only zero's are output, in which case I can conclude that you didn't define those variables global.

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 17th Jan 2013 22:31
Ok, thanks a lot all of you! Specially thecomet, I didn't think of checking the values #dumbass #noobmistake... owell, basically I have mixed the screen height and width in my ini file, which meant that it was trying to draw a 1080x1920 display with 32bit... instead of 1920x1080. The reason I missed it was because since I had encrypted the values, I couldnt spot it untill I checked up my values. Litteraly read H as W XD

Login to post a reply

Server time is: 2026-07-07 16:43:45
Your offset time is: 2026-07-07 16:43:45