Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // void ALStorage::YieldTime()
- //
- // ARGUMENTS:
- //
- // None.
- //
- // RETURNS
- //
- // Nothing.
- //
- // DESCRIPTION
- //
- // This function has two important things to do. It gets called
- // at a few different points in the process of reading or writing data
- // from storage objects. During normal reading and writing, it
- // will get called every time the buffer is loaded or flushed.
- //
- // If we are in Windows mode, we execute a PeekMessage() loop. This
- // makes sure that we aren't hogging the CPU. By doing it this way,
- // the programmer can be ensure that he/she is being a good citizen
- // without any significant effort.
- //
- // The second important function is that of calling the monitor function.
- // The user interface elements need to be updated regularly, and this
- // is done via this call.
- //
- // REVISION HISTORY
- //
- // May 26, 1994 1.0A : First release
- //
- void AL_PROTO ALStorage::YieldTime()
- {
- if ( mpMonitor )
- mpMonitor->Progress( Tell(), *this );
- /*
- * For right now I am going to put the PeekMessage loop in the load
- * buffer routine by default. Most Windows applications are going
- * to want to use this, right?
- */
- #if defined( AL_WINDOWS_GUI )
- MSG msg;
- while ( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) ) {
- TranslateMessage( &msg );
- DispatchMessage(&msg);
- }
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement