mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-09-29 23:54:53 +00:00
Ugh, GLUT idle func was chewing up CPU
- ugh, why is the millis parameter to glutTimerFunc() an int?! 1000ms/60Hz = 17ms
This commit is contained in:
parent
87a2d081d3
commit
882eae4818
@ -585,9 +585,10 @@ static void gldriver_shutdown(void) {
|
|||||||
// update, render, reshape
|
// update, render, reshape
|
||||||
//
|
//
|
||||||
#if USE_GLUT
|
#if USE_GLUT
|
||||||
static void gldriver_update(void) {
|
static void gldriver_update(int unused) {
|
||||||
c_keys_handle_input(-1, 0, 0);
|
c_keys_handle_input(-1, 0, 0);
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
|
glutTimerFunc(17, gldriver_update, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -707,7 +708,7 @@ static void gldriver_init_glut(GLuint fbo) {
|
|||||||
|
|
||||||
gldriver_init_common();
|
gldriver_init_common();
|
||||||
|
|
||||||
glutIdleFunc(gldriver_update);
|
glutTimerFunc(16, gldriver_update, 0);
|
||||||
glutDisplayFunc(gldriver_render);
|
glutDisplayFunc(gldriver_render);
|
||||||
glutReshapeFunc(gldriver_reshape);
|
glutReshapeFunc(gldriver_reshape);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user