diff --git a/client/main.c b/client/main.c index 1dfe3754..83eb0892 100644 --- a/client/main.c +++ b/client/main.c @@ -49,11 +49,6 @@ struct KVMGFXState SDL_sem * cpySem; SDL_Thread * cpyThreads[COPY_THREADS]; CopyJob cpyJobs [COPY_THREADS]; - -#ifdef DEBUG_INPUT_STATE - uint8_t kb[(SDL_NUM_SCANCODES / sizeof(uint8_t))+1]; - bool mouse[10]; -#endif }; struct KVMGFXState state; @@ -449,23 +444,6 @@ int eventThread(void * arg) mouseY = state.shm->mouseY; SDL_WarpMouseInWindow(state.window, mouseX, mouseY); } - -#ifdef DEBUG_INPUT_STATE - DEBUG_INFO("mouse state:"); - for (unsigned int i = 0; i < sizeof(state.mouse) / sizeof(bool); ++i) - { - if (state.mouse[i]) - DEBUG_INFO("0x%02x", i); - } - - DEBUG_INFO("keyboard state:"); - for (unsigned int i = 0; i < SDL_NUM_SCANCODES; ++i) - { - unsigned int block = i / 8; - if (state.kb[block] & (1 << (i - block * 8))) - DEBUG_INFO("0x%02x", i); - } -#endif break; } @@ -473,11 +451,6 @@ int eventThread(void * arg) if (scancode == 0) break; -#ifdef DEBUG_INPUT_STATE - uint16_t block = scancode / 8; - state.kb[block] |= 1 << (scancode - block * 8); -#endif - spice_key_down(scancode); break; } @@ -493,11 +466,6 @@ int eventThread(void * arg) if (scancode == 0) break; -#ifdef DEBUG_INPUT_STATE - uint16_t block = scancode / 8; - state.kb[block] &= ~(1 << (scancode - block * 8)); -#endif - spice_key_up(scancode); break; } @@ -536,9 +504,6 @@ int eventThread(void * arg) } case SDL_MOUSEBUTTONDOWN: -#ifdef DEBUG_INPUT_STATE - state.mouse[event.button.button] = true; -#endif if ( !spice_mouse_position(event.button.x, event.button.y) || !spice_mouse_press(event.button.button) @@ -553,9 +518,6 @@ int eventThread(void * arg) break; case SDL_MOUSEBUTTONUP: -#ifdef DEBUG_INPUT_STATE - state.mouse[event.button.button] = false; -#endif if ( !spice_mouse_position(event.button.x, event.button.y) || !spice_mouse_release(event.button.button)