Reviewed-by: Paul Berry <[email protected]>
---
 tests/fbo/fbo-generatemipmap-formats.c              | 3 +--
 tests/shaders/glsl-arb-fragment-coord-conventions.c | 3 +--
 tests/texturing/texdepth.c                          | 5 +++--
 tests/texturing/texwrap.c                           | 4 +---
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/tests/fbo/fbo-generatemipmap-formats.c 
b/tests/fbo/fbo-generatemipmap-formats.c
index 8ce942d..3a5163d 100644
--- a/tests/fbo/fbo-generatemipmap-formats.c
+++ b/tests/fbo/fbo-generatemipmap-formats.c
@@ -480,9 +480,8 @@ void piglit_init(int argc, char **argv)
 {
        fbo_formats_init(argc, argv, GL_FALSE);
 
-       glutKeyboardFunc(key_func);
-
        if (!piglit_automatic) {
+               glutKeyboardFunc(key_func);
                printf("    -n   Next test set.\n"
                       "    -N   Previous test set.\n"
                       "    -m   Next format in the set.\n"
diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions.c 
b/tests/shaders/glsl-arb-fragment-coord-conventions.c
index 21f2b25..fd1a683 100644
--- a/tests/shaders/glsl-arb-fragment-coord-conventions.c
+++ b/tests/shaders/glsl-arb-fragment-coord-conventions.c
@@ -225,7 +225,6 @@ void piglit_init(int argc, char **argv)
 
        if (!piglit_automatic) {
                printf("Press t to switch between subtests.\n");
+               glutKeyboardFunc(key_func);
        }
-
-       glutKeyboardFunc(key_func);
 }
diff --git a/tests/texturing/texdepth.c b/tests/texturing/texdepth.c
index 2be7dc1..20ca56e 100644
--- a/tests/texturing/texdepth.c
+++ b/tests/texturing/texdepth.c
@@ -383,10 +383,11 @@ piglit_init(int argc, char **argv)
        GLfloat texbuf[4];
 
        glutReshapeFunc(Reshape);
-       glutKeyboardFunc(Key);
 
-       if (!piglit_automatic)
+       if (!piglit_automatic) {
+               glutKeyboardFunc(Key);
                printf("Press 't' to cycle through test images\n");
+       }
 
        piglit_require_extension("GL_ARB_depth_texture");
        HaveShadow = piglit_is_extension_supported("GL_ARB_shadow");
diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
index 4daf56d..2fb3d03 100644
--- a/tests/texturing/texwrap.c
+++ b/tests/texturing/texwrap.c
@@ -1458,15 +1458,13 @@ void piglit_init(int argc, char **argv)
 
     piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
 
-    if (!piglit_automatic)
-      glutKeyboardFunc(key_func);
-
     glClearColor(0.5, 0.5, 0.5, 1.0);
 
     assert(glGetError() == 0);
     init_textures();
 
     if (!piglit_automatic) {
+        glutKeyboardFunc(key_func);
         printf("Hotkeys in the interactive mode:\n"
                "    b  - use 1-pixel texture border (deprecated in GL3)\n"
                "    p  - use projective texturing\n"
-- 
1.7.12

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to