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.

Dark GDK / Problem with SetDisplayMode function

Author
Message
aerostudios
15
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 11th Oct 2011 04:54 Edited at: 11th Oct 2011 04:56
I posted this problem in the Dark GDK.net area, but was told to try posting it here.
I am trying simply read my desktop resolution, and then force my app to run fullscreen at that resolution. I am trying to accomplish this using the DarkGDK.net.
This function works flawlessly on my PC when I am using Dark Basic Professional, so I seriously doubt there is an issue with the core DLLs, but here is my code in VS2008 with Visual Basic.



The variable "cm" equates to true when I use .CheckDisplayMode, but then DarkGDK.Core.Sync() triggers a memory violation error.
And when I check the Display.Screenwidth, it returns 640 and Display.Screenheight returns 480, regardless of my display resolution.

Any ideas?

Russell B. Davis/aerostudios
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 11th Oct 2011 05:55
Hmm... I would try taking out the sync in the conditional statement. I do wonder if the memory violation will still occur when you sync later in your code though. Does the memory violation crash the program?
aerostudios
15
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 11th Oct 2011 15:39
That is what is odd. I loaded a default template, which included the sync statement in the game loop. The sync command causes a memory fault ONLY when I add the SetDisplayMode command. As long as I leave out the SetDisplayMode command, there is no error with the sync command. If I remove the sync command, but leave the SetDisplayMode command, it has no affect and the program runs in 640x480 without error.

Russell B. Davis/aerostudios
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 12th Oct 2011 02:01
It seems like a bug with DarkGDK.NET, I would try updating or downgrading the version of DGDK.NET you are using and see if that remedy's the situation.

Login to post a reply

Server time is: 2024-11-19 07:36:41
Your offset time is: 2024-11-19 07:36:41