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 / Graphics Adapter and Screen Modes...

Author
Message
Slartibardfast
16
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Magrathea
Posted: 4th Apr 2011 17:50
I noticed that there are a few (ahem) posts around this issue, but my searches have not come up with anything that seems to address this particular issue, or at least provide a solution/workaround.

It stems from the Project Properties "Screen" (Screen Type, Windows Resolution, Full Screen Resolution), and the fact that DBP seems to compile settings for screen handling BEFORE any custom Code can be/is processed.

Is there any way around this? Most of the time, you can set an 'humane' default which 'should' work on any system, and then pick up any custom handling you want to apply, and on the whole, this works.

However... I am having some problems, in particular with respect to trying to run DBP executables on Virtual Machines, where no matter what setting I use in the Screen Project Properties, the program fails with that blessed "Runtime Error 1512 - Display is not supported by available hardware at line 0" thingy.

I think I have tried every permutation of the Properties but to no avail. Is there any way to switch this behaviour off?, i.e. the compiled executable just uses the default Adapter Setting in place on the PC (Virtual or otherwise). Although there are plenty of Commands available to read the Adapter Settings etc., if you cannot get the program that far, then it's all rather academic...

If there is already a post(s) that deal with this particularly, just point me to the link.

Much obliged earthlings...
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 4th Apr 2011 18:46
You can use the PERFORM CHECKLIST FOR DISPLAY MODES to see all the valid screen modes for the computer running the program.



Slartibardfast
16
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Magrathea
Posted: 5th Apr 2011 02:06
Hi Grog. Thanks for that. I thought maybe I was mistaken or lost the plot somewhere, so I went back and checked again in case I had been talking through my **** (which has been known to happen ).

I tried your Code. Same result.

I created a Project where the only line of Code is:

PERFORM CHECKLIST FOR FILES

That's it. Ok, I put a WAIT KEY and an END after as well.

No matter what I put in the Screen Project Properties (fullscreen, windows, desktop, fulldesktop, hidden) - by the way, what does 'hidden' actually mean/do? - 640x480, 800x600, 1024x768, 16 bit, 32 bit etc etc, when I try to run it on an XP Virtual machine I have installed on a machine, I get the "Runtime Error 1512 - Display is not supported by available hardware at line 0".

It's not as if the Virtual Machine will not run programs, it does, but not compiled DBP programs. Mmmm. I even tried your Code on it with the same result. The point I am trying to make is that (it seems) that it never gets as far as the Code. It is failing on the executable before it runs any of the custom code. I hope that makes sense.

So this takes me back to my original question; is there any way to get around this behaviour of DBP? As I said, if the program fails before any custom code is processed, then it doesn't matter what the code is, or even if there is any code (yes, I tried running a program compiled without any code in it at all. Same result).

As it happens, this is not a serious show stopper, as not being able to run it on the Virtual Machine does not cause any real life problems. It is more a curiosity, but there it is. Maybe there is no way to get round this behaviour, but if there is, it would be good to know how, and I would like to get it to run on the VM.

On the other hand, the ultimate answer to life, the universe, and everything is 101010........
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Apr 2011 08:44
It could be the projects default screen size isn't supported. Try switching the default resolution to something higher.

Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 5th Apr 2011 09:04 Edited at: 5th Apr 2011 09:06
If you set it to windowed mode, you can start at 320x200, then maybe the code will run far enough to test your machines graphic modes?

Or maybe editing the .dbpro file outside of the editor? And compiling outside the editor? *shrugs*

Slartibardfast
16
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Magrathea
Posted: 5th Apr 2011 13:26
Alas no joy, but thanks for the suggestions. Interesting idea there Rich. Edit the dbpro file and compile outside the Editor (now to look at how to do that). Hadn't thought of that....

Login to post a reply

Server time is: 2026-07-11 14:56:55
Your offset time is: 2026-07-11 14:56:55