mirror of
https://github.com/glfw/glfw.git
synced 2026-08-29 03:04:14 +02:00
Removed auto-polling.
This commit is contained in:
@@ -149,7 +149,6 @@ struct _GLFWwin_struct {
|
||||
// User selected window settings
|
||||
int fullscreen; // Fullscreen flag
|
||||
int mouseLock; // Mouse-lock flag
|
||||
int autoPollEvents; // Auto polling flag
|
||||
int sysKeysDisabled; // System keys disabled flag
|
||||
int windowNoResize; // Resize- and maximize gadgets disabled flag
|
||||
int refreshRate; // Vertical monitor refresh rate
|
||||
|
||||
@@ -81,7 +81,6 @@ struct _GLFWwin_struct {
|
||||
// User selected window settings
|
||||
int fullscreen; // Fullscreen flag
|
||||
int mouseLock; // Mouse-lock flag
|
||||
int autoPollEvents; // Auto polling flag
|
||||
int sysKeysDisabled; // System keys disabled flag
|
||||
int windowNoResize; // Resize- and maximize gadgets disabled flag
|
||||
int refreshRate; // Vertical monitor refresh rate
|
||||
|
||||
25
lib/enable.c
25
lib/enable.c
@@ -197,25 +197,6 @@ static void disableKeyRepeat(void)
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Enable automatic event polling
|
||||
//========================================================================
|
||||
|
||||
static void enableAutoPollEvents(void)
|
||||
{
|
||||
_glfwWin.autoPollEvents = 1;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Disable automatic event polling
|
||||
//========================================================================
|
||||
|
||||
static void disableAutoPollEvents(void)
|
||||
{
|
||||
_glfwWin.autoPollEvents = 0;
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** GLFW user functions ****
|
||||
//************************************************************************
|
||||
@@ -246,9 +227,6 @@ GLFWAPI void glfwEnable(int token)
|
||||
case GLFW_KEY_REPEAT:
|
||||
enableKeyRepeat();
|
||||
break;
|
||||
case GLFW_AUTO_POLL_EVENTS:
|
||||
enableAutoPollEvents();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -281,9 +259,6 @@ GLFWAPI void glfwDisable(int token)
|
||||
case GLFW_KEY_REPEAT:
|
||||
disableKeyRepeat();
|
||||
break;
|
||||
case GLFW_AUTO_POLL_EVENTS:
|
||||
disableAutoPollEvents();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,6 @@ struct _GLFWwin_struct {
|
||||
// User selected window settings
|
||||
int fullscreen; // Fullscreen flag
|
||||
int mouseLock; // Mouse-lock flag
|
||||
int autoPollEvents; // Auto polling flag
|
||||
int sysKeysDisabled; // System keys disabled flag
|
||||
int windowNoResize; // Resize- and maximize gadgets disabled flag
|
||||
int refreshRate; // Vertical monitor refresh rate
|
||||
|
||||
11
lib/window.c
11
lib/window.c
@@ -470,10 +470,9 @@ GLFWAPI int glfwOpenWindow(int width, int height,
|
||||
return GL_FALSE;
|
||||
|
||||
// Clear GLFW window state
|
||||
_glfwWin.active = GL_TRUE;
|
||||
_glfwWin.iconified = GL_FALSE;
|
||||
_glfwWin.mouseLock = GL_FALSE;
|
||||
_glfwWin.autoPollEvents = GL_TRUE;
|
||||
_glfwWin.active = GL_TRUE;
|
||||
_glfwWin.iconified = GL_FALSE;
|
||||
_glfwWin.mouseLock = GL_FALSE;
|
||||
_glfwClearInput();
|
||||
|
||||
// Unregister all callback functions
|
||||
@@ -742,10 +741,6 @@ GLFWAPI void glfwSwapBuffers(void)
|
||||
// Update display-buffer
|
||||
if (_glfwWin.opened)
|
||||
_glfwPlatformSwapBuffers();
|
||||
|
||||
// Check for window messages
|
||||
if (_glfwWin.autoPollEvents)
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -188,7 +188,6 @@ struct _GLFWwin_struct {
|
||||
// User selected window settings
|
||||
int fullscreen; // Fullscreen flag
|
||||
int mouseLock; // Mouse-lock flag
|
||||
int autoPollEvents; // Auto polling flag
|
||||
int sysKeysDisabled; // System keys disabled flag
|
||||
int windowNoResize; // Resize- and maximize gadgets disabled flag
|
||||
int refreshRate; // Vertical monitor refresh rate
|
||||
|
||||
Reference in New Issue
Block a user