From eb7e142b6753d2fbd9dfe04b74739ab79e96234a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 12 Feb 2003 09:55:17 +0000 Subject: [PATCH] Don't return -1 on keyboard read failure --- src/native/win32/org_lwjgl_input_Keyboard.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/native/win32/org_lwjgl_input_Keyboard.cpp b/src/native/win32/org_lwjgl_input_Keyboard.cpp index 95286312..77a9e8d4 100644 --- a/src/native/win32/org_lwjgl_input_Keyboard.cpp +++ b/src/native/win32/org_lwjgl_input_Keyboard.cpp @@ -244,43 +244,36 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_input_Keyboard_nRead } } } - return num_events; } else if (ret == DI_BUFFEROVERFLOW) { #ifdef _DEBUG printf("Keyboard buffer overflowed\n"); #endif - return -1; } else if (ret == DIERR_INPUTLOST) { #ifdef _DEBUG printf("Input lost\n"); #endif - return -1; } else if (ret == DIERR_NOTACQUIRED) { #ifdef _DEBUG printf("not acquired\n"); #endif - return -1; } else if (ret == DIERR_INVALIDPARAM) { #ifdef _DEBUG printf("invalid parameter\n"); #endif - return -1; } else if (ret == DIERR_NOTBUFFERED) { #ifdef _DEBUG printf("not buffered\n"); #endif - return -1; } else if (ret == DIERR_NOTINITIALIZED) { #ifdef _DEBUG printf("not inited\n"); #endif - return -1; } else { #ifdef _DEBUG printf("unknown keyboard error\n"); #endif - return -1; } + return num_events; } /*