Jump to content
  • Advertisement
Sign in to follow this  
PumpkinPieman

Linking together different components.

This topic is 4390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is always a problem I end up back at, I haven't figured out a good system for it as well. The render class I have creates the window and sets up the device, when the window changes from windowed to full screen or vice versa the window is destroyed then recreated. Is there a good method to reset DirectSound and DirectInput without supplying the Render class to get the current hWnd?

Share this post


Link to post
Share on other sites
Advertisement
You should not be totally destroying the window when you change from fullscreen to windowed (or the opposite). When you are changing to fullscreen, all you have to do is fill out your D3DPRESENT_PARAMETERS structure appropriately and reset the device.

When you are changing to windowed, fill out your presentation params again (of course, set the Windowed member to true this time). Depending on the current window size, you may need to re-adjust it using standard Win32 APIs.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!