projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clear window workmask when queuing up window for destruction. All callbacks (except...
[freeglut]
/
src
/
mswin
/
fg_init_mswin.c
diff --git
a/src/mswin/fg_init_mswin.c
b/src/mswin/fg_init_mswin.c
index
f80fe78
..
b1c51da
100644
(file)
--- a/
src/mswin/fg_init_mswin.c
+++ b/
src/mswin/fg_init_mswin.c
@@
-1,5
+1,5
@@
/*
/*
- * freeglut_init_mswin.c
+ * fg_init_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
*
* The Windows-specific mouse cursor related stuff.
*
@@
-33,6
+33,8
@@
extern LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg,
WPARAM wParam, LPARAM lParam );
extern LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg,
WPARAM wParam, LPARAM lParam );
+extern void fgPlatformInitSystemTime();
+extern void fghCloseInputDevices(void);
/*
/*
@@
-41,7
+43,7
@@
extern LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg,
void fgPlatformInitialize( const char* displayName )
{
WNDCLASS wc;
void fgPlatformInitialize( const char* displayName )
{
WNDCLASS wc;
- ATOM atom;
+ BOOL atom;
/* What we need to do is to initialize the fgDisplay global structure here. */
fgDisplay.pDisplay.Instance = GetModuleHandle( NULL );
/* What we need to do is to initialize the fgDisplay global structure here. */
fgDisplay.pDisplay.Instance = GetModuleHandle( NULL );
@@
-56,9
+58,6
@@
void fgPlatformInitialize( const char* displayName )
* Each of the windows should have its own device context, and we
* want redraw events during Vertical and Horizontal Resizes by
* the user.
* Each of the windows should have its own device context, and we
* want redraw events during Vertical and Horizontal Resizes by
* the user.
- *
- * XXX Old code had "| CS_DBCLCKS" commented out. Plans for the
- * XXX future? Dead-end idea?
*/
wc.lpfnWndProc = fgPlatformWindowProc;
wc.cbClsExtra = 0;
*/
wc.lpfnWndProc = fgPlatformWindowProc;
wc.cbClsExtra = 0;
@@
-117,6
+116,10
@@
void fgPlatformInitialize( const char* displayName )
}
/* Set the timer granularity to 1 ms */
timeBeginPeriod ( 1 );
}
/* Set the timer granularity to 1 ms */
timeBeginPeriod ( 1 );
+ /* Init setup to deal with timer wrap, can't query system time before this is done */
+ fgPlatformInitSystemTime();
+ /* Get start time */
+ fgState.Time = fgSystemTime();
fgState.Initialised = GL_TRUE;
fgState.Initialised = GL_TRUE;
@@
-136,8
+139,6
@@
void fgPlatformInitialize( const char* displayName )
/* Platform-Specific Deinitialization Functions: */
/* Platform-Specific Deinitialization Functions: */
-extern void fghCloseInputDevices ( void );
-
void fgPlatformDeinitialiseInputDevices ( void )
{
#if !defined(_WIN32_WCE)
void fgPlatformDeinitialiseInputDevices ( void )
{
#if !defined(_WIN32_WCE)