Re: OSX have that is equivalent to WaitMessage() Win32 API
Re: OSX have that is equivalent to WaitMessage() Win32 API
- Subject: Re: OSX have that is equivalent to WaitMessage() Win32 API
- From: Warren Dodge <email@hidden>
- Date: Mon, 19 Oct 2009 13:59:05 -0700
On Oct 18, 2009, at 9:43 PM, Mars999 wrote:
void CEngine::Start()
{
m_lLastTick = SDL_GetTicks();
m_bQuit = false;
// Main loop: loop forever.
while ( !m_bQuit )
{
// Handle mouse and keyboard input
HandleInput();
if ( m_bMinimized ) {
// Release some system resources if the app. is minimized.
WaitMessage(); // pause the application until focus in
regained
} else {
// Do some thinking
DoThink();
// Render stuff
DoRender();
}
}
End();
}
The most likely place where you might write this kind of low-level
code is in games. If that's what you're trying to do, I'd recommend
checking out the iDevGames forum:
http://www.idevgames.com/forum/
If you're writing a standard application, you'll need a more standard
Mac approach as other people have suggested.
Warren
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden