mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Merge branch 'master' into multi-monitor
Conflicts: include/GL/glfw3.h readme.html src/CMakeLists.txt src/win32_window.c src/window.c src/x11_window.c tests/clipboard.c tests/defaults.c tests/events.c tests/fsfocus.c tests/glfwinfo.c tests/joysticks.c tests/peter.c tests/sharing.c tests/tearing.c tests/title.c tests/windows.c
This commit is contained in:
+3
-26
@@ -41,8 +41,6 @@
|
||||
#include <locale.h>
|
||||
|
||||
// These must match the input mode defaults
|
||||
static GLboolean keyrepeat = GL_FALSE;
|
||||
static GLboolean systemkeys = GL_TRUE;
|
||||
static GLboolean closeable = GL_TRUE;
|
||||
|
||||
// Event index
|
||||
@@ -249,12 +247,12 @@ static void window_refresh_callback(GLFWwindow window)
|
||||
}
|
||||
}
|
||||
|
||||
static void window_focus_callback(GLFWwindow window, int activated)
|
||||
static void window_focus_callback(GLFWwindow window, int focused)
|
||||
{
|
||||
printf("%08x at %0.3f: Window %s\n",
|
||||
counter++,
|
||||
glfwGetTime(),
|
||||
activated ? "activated" : "deactivated");
|
||||
focused ? "focused" : "defocused");
|
||||
}
|
||||
|
||||
static void window_iconify_callback(GLFWwindow window, int iconified)
|
||||
@@ -311,24 +309,6 @@ static void key_callback(GLFWwindow window, int key, int action)
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case GLFW_KEY_R:
|
||||
{
|
||||
keyrepeat = !keyrepeat;
|
||||
glfwSetInputMode(window, GLFW_KEY_REPEAT, keyrepeat);
|
||||
|
||||
printf("(( key repeat %s ))\n", keyrepeat ? "enabled" : "disabled");
|
||||
break;
|
||||
}
|
||||
|
||||
case GLFW_KEY_S:
|
||||
{
|
||||
systemkeys = !systemkeys;
|
||||
glfwSetInputMode(window, GLFW_SYSTEM_KEYS, systemkeys);
|
||||
|
||||
printf("(( system keys %s ))\n", systemkeys ? "enabled" : "disabled");
|
||||
break;
|
||||
}
|
||||
|
||||
case GLFW_KEY_C:
|
||||
{
|
||||
closeable = !closeable;
|
||||
@@ -389,7 +369,7 @@ int main(void)
|
||||
|
||||
printf("Library initialized\n");
|
||||
|
||||
window = glfwCreateWindow(0, 0, "Event Linter", NULL, NULL);
|
||||
window = glfwCreateWindow(640, 480, "Event Linter", NULL, NULL);
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
@@ -420,9 +400,6 @@ int main(void)
|
||||
glfwGetWindowSize(window, &width, &height);
|
||||
printf("Window size should be %ix%i\n", width, height);
|
||||
|
||||
printf("Key repeat should be %s\n", keyrepeat ? "enabled" : "disabled");
|
||||
printf("System keys should be %s\n", systemkeys ? "enabled" : "disabled");
|
||||
|
||||
printf("Main loop starting\n");
|
||||
|
||||
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED))
|
||||
|
||||
Reference in New Issue
Block a user