• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OSX have that is equivalent to WaitMessage() Win32 API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OSX have that is equivalent to WaitMessage() Win32 API


  • Subject: Re: OSX have that is equivalent to WaitMessage() Win32 API
  • From: M Pulis <email@hidden>
  • Date: Sun, 18 Oct 2009 22:41:29 -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();
}


Hope that clears it up....



Exactly! Proves _every_ respondent's point, but, to underscore:

OSX != Win32API
Cocoa != Win32API
Carbon != Win32API
Mac Applications != Windows Executables

Study any Apple sample code (please!); notice immediately that MacOS (event driven) apps don't need old-model while-not-quit-do-loops, I/O polling and WaitMessage locks. And that just begins your adventure....

My recommendation for porting Win to Mac : Charge Hourly, never a fixed-price contract!

Good Luck!

Gary


_______________________________________________

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


References: 
 >OSX have that is equivalent to WaitMessage() Win32 API (From: Mars999 <email@hidden>)

  • Prev by Date: Re: Getting a view's size?
  • Next by Date: Re: Getting a view's size?
  • Previous by thread: OSX have that is equivalent to WaitMessage() Win32 API
  • Next by thread: Re: OSX have that is equivalent to WaitMessage() Win32 API
  • Index(es):
    • Date
    • Thread