Resolution changing?
Hi again... this is an issue that's been there pretty much since the beginning, but my primary screen is big enough for me to comfortably run it windowed, so I never confronted it. I've decided it's time to make it right.
The game is based on 1024x768 resolution. It can run windowed, and it runs just fine. But running full screen is presenting slight problems. Formerly, I was using an external library to change the resolution, then let DX sit inside that... I gave a shot at not calling that function, just telling DX to run it full screen. It seemed to handle the change much more smoothly, but the end of the render scene lost the device somewhere... is there something special that needs to be set up for it to work properly? Here's what I have right now for setting the device up in full screen:
if (fullScreen)
{
presentParams.Windowed = false;
presentParams.DeviceWindow = this;
presentParams.BackBufferFormat = Format.X8R8G8B8;
presentParams.BackBufferHeight = 768;
presentParams.BackBufferWidth = 1024;
presentParams.PresentationInterval = PresentInterval.Default;
}
No, that should be sufficient. For reference, examine some of the tutorials/samples either in the SDK or available online - it could be that you're missing some silly little detail [smile]
Chances are something else is interfering with your application and triggering the lost-device. Make sure you have the debug runtime working and you've got decent return-code/exception handling.
hth
Jack
Chances are something else is interfering with your application and triggering the lost-device. Make sure you have the debug runtime working and you've got decent return-code/exception handling.
hth
Jack
Quote:Original post by jollyjeffersSeconded.
Make sure you have the debug runtime working...
Na na na na na na na na, na na na na na na na na, debug runtimes!
I'm not familiar with how lost devices work in DirectX. Would simply changing from windowed to full screen cause a lost device in and of itself? You're essentially recreating the device aren't you?
Quote:Original post by ravyne2001Nope, it wouldn't. You're not re-creating the device per-se, you're just resetting it. That shouldn't cause the device to be lost. What will cause the device to be lost though, is alt+tabbing to another app, or another app forcing itself into focus.
I'm not familiar with how lost devices work in DirectX. Would simply changing from windowed to full screen cause a lost device in and of itself? You're essentially recreating the device aren't you?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement