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 / Multitasking problem

Author
Message
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 28th May 2008 15:11
I am using dbSetWindowOff() to open my game in fullscreen mode.

All works fine until I press ALT+TAB to get back to Windows Desktop. Game is minimised ok.

When I maximize game all i get is a black screen.

What am I doing wrong? Or do I have to write some code to handle minimizing/maximizing?
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 28th May 2008 15:37
Doing that makes the D3D Device is reset, meaning all texture and mesh data is erased, as well as many settings. You can detect when this happens using dbScreenInvalid(), and just reload all textures, images, objects etc.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th May 2008 14:20
bad news for me then
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th May 2008 14:21
can i disable alt+tab in any way?
i know, it sounds like a stupid "way out", but anyway...
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th May 2008 16:49
I used dbSetWindowLayout(0,0,0) instead of dbSetWindowOff() and got the same result (fullscreen window without border, maximize, close), and I can alt+tab to Windows without problems.

However I have noticed that without the dbSetWindowOff() command my framerate has dropped considerably
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th May 2008 17:59
yeah - because your running in "windows" display versus exclusive mode. Though that's not a bad workaround.

"Simply reloading" all the resources and trying to get them exactl how they were means you need to track EVERY THING outside of GDK, like opbject position, rotation, filenames, any steps like rotate + fixpivot etc.... ITs a PAIN...

In fact, looking into directx, this issue happens, but you don't need to reload everything, you just need to "recreate" the surface and just tell directX what stuff comes from where in memory again. And render as usual. that's the impression I get. This is a frustrating deal.

Login to post a reply

Server time is: 2024-11-20 11:39:09
Your offset time is: 2024-11-20 11:39:09