Jump to content
  • Advertisement
Sign in to follow this  
guvidu

Mac XCode see if the windows has focus

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

Hy Is there a specific function or something that tells you if the current window has focus on mac os x - XCode(carbon) I have done my window with GLUT but i need to capture the focus of the window and put my game on pause mode if the window losses focus Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by guvidu
Hy
Is there a specific function or something that tells you if the current window has focus on mac os x - XCode(carbon)
I have done my window with GLUT but i need to capture the focus of the window and put my game on pause mode if the window losses focus
Thanks!
I may have already mentioned this in your other thread, but you should really consider switching to SDL. Yes, it might slow you down a bit (depending on how much GLUT-based code you've already written), but SDL is more fully-featured and is better supported than GLUT. (For example, with SDL solving the focus problem you mention becomes trivial, as SDL makes change-of-focus events directly available to the user.)

Share this post


Link to post
Share on other sites
i know you are right but i already done the game - and thats the only thing that is left to do to it, and i dont want to change any code to it. Specialy couse its alot:):P
Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by guvidu
i know you are right but i already done the game - and thats the only thing that is left to do to it, and i dont want to change any code to it. Specialy couse its alot:):P
Thanks
I see :) Well, I'm not that familiar with GLUT so I'm afraid I can't answer your question, but maybe someone else will be able to.

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.

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!