Jump to content
  • Advertisement
Sign in to follow this  
ogracian

IDirectDraw7::TestCooperativeLevel... please help

This topic is 5453 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

Hello I am coding a simply DirectDraw app in windowed but I want to use IDirectDraw7::TestCooperativeLevel to handle display mode changes(Ex: Not switching to full screen but changing desktop display mode from 1024x768x16 to 1024x768x32 while my app is running). The SDK docs suggest that when TestCooperativeLevel return DDERR_WRONGMODE, the application should destroy and re-create any surfaces before continuing execution, the trouble here is that it dose not seem to be working, I mean, when I receive the DDERR_WRONGMODE, I destroy my front and back surfaces (all surfaces used by my app), and recreate it but TestCooperativeLevel keeps returning DDERR_WRONGMODE. The only thing to stop TestCooperativeLevel from keep returning DDERR_WRONGMODE is release and recreate the LPDIRECTDRAW7 object. So I really appreciate any help about this trouble, Thanks. Oscar EX: In my main loop and frame start I do: HRESULT hRes = -1; do { hRes = g_pDD->TestCooperativeLevel(); if (hRes == DDERR_WRONGMODE) { ReleaseAllObjects(); InitSurfaces(); } } while (hRes != DD_OK);

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!