Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

OneEyeLessThanNone

Surface trouble

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

When I run my program (fullscreen 640x480x16) winamp draws over the surface. So I end up having the surface with winamp on top. How do I stop this? And why does winamp stop playing if I lock a surface? If a surface is locked, does DirectX prevent other apps from doing stuff?

Share this post


Link to post
Share on other sites
Advertisement
Well, one easy trick would be to close Winamp. Or at least make sure it isn''t set to "Always on Top" (should be in the preferences somewhere).

As far as why Winamp stops playing when you lock a surface, I have no idea.

Share this post


Link to post
Share on other sites
When you create your window use the WS_EX_TOPMOST extended window style. What is happening is that you probably have WinAmp set to stay on top. WinAmp does this by setting its WS_EX_TOPMOST window style. When multiple windows have this style the window that is active is the one that will end up on top.

As far as WinAmp stopping when you lock a surface, the answer is yes. When you lock a surface, DirectX grabs something called the Win16 mutex. This is a thread syncronization object inside of Windows originaly used for Win16 compatiblity and it basicaly stops premtive multitasking. The DirectX developers used this to keep any other application from modifing the frame buffer when someone is writing to it.

Share this post


Link to post
Share on other sites
Thanks, that explains winamp not playing but my window is WS_EX_TOPMOST, I remember that quake2 does not have this problem as well as many other professional dx games. Could there be something I could change in the DDraw inits? Surface properties?

Share this post


Link to post
Share on other sites
Hmm, make sure that (if it''s a fullscreen app) to set the cooperative level to something like DDSCL_EXCLUSIVE / DDSCL_FULLSCREEN
Maybe that''ll help. Anyway, good luck

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!