Sign in to follow this  
timeshifter

Resolution changing?

Recommended Posts

timeshifter    122
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; }

Share this post


Link to post
Share on other sites
jollyjeffers    1570
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

Share this post


Link to post
Share on other sites
Ravyne    14300
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?

Share this post


Link to post
Share on other sites
Evil Steve    2017
Quote:
Original post by ravyne2001
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?
Nope, 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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this