2008-03-30 Neil Roberts <neil@o-hand.com>

* clutter/win32/clutter-backend-win32.c
	(clutter_backend_win32_init): Added a call to
	timeBeginPeriod. Without this the frame rates are terrible because
	the glib timeouts are not accurate enough. However this requires
	Glib >= 2.16.0 to take any effect because of a change in the way
	g_poll is implemented. See revision 6597 of glib.
	(clutter_backend_win32_finalize): Added a call to timeEndPeriod.

	* configure.ac: Added -lwinmm to the library dependencies for the
	Win32 backend.
This commit is contained in:
Neil Roberts 2008-03-30 22:27:27 +00:00
parent 1a263dca5c
commit e88c8b4ce1
3 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,16 @@
2008-03-30 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-backend-win32.c
(clutter_backend_win32_init): Added a call to
timeBeginPeriod. Without this the frame rates are terrible because
the glib timeouts are not accurate enough. However this requires
Glib >= 2.16.0 to take any effect because of a change in the way
g_poll is implemented. See revision 6597 of glib.
(clutter_backend_win32_finalize): Added a call to timeEndPeriod.
* configure.ac: Added -lwinmm to the library dependencies for the
Win32 backend.
2008-03-30 Neil Roberts <neil@o-hand.com>
* clutter/win32/clutter-win32.h:

View File

@ -89,6 +89,8 @@ clutter_backend_win32_finalize (GObject *gobject)
{
backend_singleton = NULL;
timeEndPeriod (1);
G_OBJECT_CLASS (clutter_backend_win32_parent_class)->finalize (gobject);
}
@ -299,6 +301,11 @@ clutter_backend_win32_init (ClutterBackendWin32 *backend_win32)
clutter_backend_set_double_click_time (backend, 250);
clutter_backend_set_double_click_distance (backend, 5);
clutter_backend_set_resolution (backend, 96.0);
/* Set the maximum precision for Windows time functions. Without
this glib will not be able to sleep accurately enough to give a
reasonable frame rate */
timeBeginPeriod (1);
}
GType

View File

@ -292,7 +292,7 @@ case $clutterbackend in
fi
WIN32_CFLAGS="-D_WIN32_WINNT=0x0500"
WIN32_LIBS="-lGLee -lopengl32 -lgdi32"
WIN32_LIBS="-lGLee -lopengl32 -lgdi32 -lwinmm"
CLUTTER_LT_LDFLAGS="$CLUTTER_LT_LDFLAGS -no-undefined"
;;