Missed a block where one level was 2-space indented.

Nit-picked a few other lines for consistancy.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@293 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-11-04 01:10:13 +00:00
parent 9b257588e0
commit 2c356e1221

View File

@ -278,9 +278,9 @@ long fgElapsedTime( void )
elapsed = (now.tv_usec - fgState.Time.Value.tv_usec) / 1000; elapsed = (now.tv_usec - fgState.Time.Value.tv_usec) / 1000;
elapsed += (now.tv_sec - fgState.Time.Value.tv_sec) * 1000; elapsed += (now.tv_sec - fgState.Time.Value.tv_sec) * 1000;
return( elapsed ); return elapsed;
#elif TARGET_HOST_WIN32 #elif TARGET_HOST_WIN32
return (timeGetTime() - fgState.Time.Value); return timeGetTime() - fgState.Time.Value;
#endif #endif
} }
@ -409,8 +409,7 @@ static void fgSleepForEvents( void )
struct timeval wait; struct timeval wait;
long msec; long msec;
if( fgState.IdleCallback || if( fgState.IdleCallback || fgHavePendingRedisplays( ) )
fgHavePendingRedisplays() )
return; return;
socket = ConnectionNumber( fgDisplay.Display ); socket = ConnectionNumber( fgDisplay.Display );
FD_ZERO( &fdset ); FD_ZERO( &fdset );
@ -1143,7 +1142,6 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
/* glutSetCursor( fgStructure.Window->State.Cursor ); */ /* glutSetCursor( fgStructure.Window->State.Cursor ); */
printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window, printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window,
window->State.Cursor ); window->State.Cursor );
glutSetCursor( window->State.Cursor ); glutSetCursor( window->State.Cursor );
} }
@ -1247,7 +1245,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
/* /*
* The window already got destroyed, so don't bother with it. * The window already got destroyed, so don't bother with it.
*/ */
return( 0 ); return 0;
case WM_MOUSEMOVE: case WM_MOUSEMOVE:
{ {
@ -1257,12 +1255,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
if ( window->ActiveMenu ) if ( window->ActiveMenu )
{ {
window->State.Redisplay = TRUE; window->State.Redisplay = TRUE;
/*
* Since the window is a menu, make the parent window current
*/
fgSetWindow ( window->ActiveMenu->ParentWindow ); fgSetWindow ( window->ActiveMenu->ParentWindow );
break; break;
} }
@ -1461,13 +1454,16 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
* XXX buttons. Sorry. * XXX buttons. Sorry.
*/ */
int button = wheel_number*2 + 4; int button = wheel_number*2 + 4;
button += (1 + direction)/2; if( direction > 0 )
++button;
window->Callbacks.Mouse( button, GLUT_DOWN, window->Callbacks.Mouse( button, GLUT_DOWN,
window->State.MouseX, window->State.MouseX,
window->State.MouseY ) ; window->State.MouseY
);
window->Callbacks.Mouse( button, GLUT_UP, window->Callbacks.Mouse( button, GLUT_UP,
window->State.MouseX, window->State.MouseX,
window->State.MouseY ) ; window->State.MouseY
);
} }
fgStructure.Window->State.Modifiers = 0xffffffff; fgStructure.Window->State.Modifiers = 0xffffffff;
@ -1660,7 +1656,6 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
if( window->Callbacks.Display ) if( window->Callbacks.Display )
{ {
fgSetWindow( window ); fgSetWindow( window );
window->Callbacks.Display( ); window->Callbacks.Display( );
} }