mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
[client] removed useless input debugging
This commit is contained in:
parent
6e7b65023b
commit
eb4bcc8814
@ -49,11 +49,6 @@ struct KVMGFXState
|
|||||||
SDL_sem * cpySem;
|
SDL_sem * cpySem;
|
||||||
SDL_Thread * cpyThreads[COPY_THREADS];
|
SDL_Thread * cpyThreads[COPY_THREADS];
|
||||||
CopyJob cpyJobs [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;
|
struct KVMGFXState state;
|
||||||
@ -449,23 +444,6 @@ int eventThread(void * arg)
|
|||||||
mouseY = state.shm->mouseY;
|
mouseY = state.shm->mouseY;
|
||||||
SDL_WarpMouseInWindow(state.window, mouseX, 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,11 +451,6 @@ int eventThread(void * arg)
|
|||||||
if (scancode == 0)
|
if (scancode == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef DEBUG_INPUT_STATE
|
|
||||||
uint16_t block = scancode / 8;
|
|
||||||
state.kb[block] |= 1 << (scancode - block * 8);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
spice_key_down(scancode);
|
spice_key_down(scancode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -493,11 +466,6 @@ int eventThread(void * arg)
|
|||||||
if (scancode == 0)
|
if (scancode == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef DEBUG_INPUT_STATE
|
|
||||||
uint16_t block = scancode / 8;
|
|
||||||
state.kb[block] &= ~(1 << (scancode - block * 8));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
spice_key_up(scancode);
|
spice_key_up(scancode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -536,9 +504,6 @@ int eventThread(void * arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
#ifdef DEBUG_INPUT_STATE
|
|
||||||
state.mouse[event.button.button] = true;
|
|
||||||
#endif
|
|
||||||
if (
|
if (
|
||||||
!spice_mouse_position(event.button.x, event.button.y) ||
|
!spice_mouse_position(event.button.x, event.button.y) ||
|
||||||
!spice_mouse_press(event.button.button)
|
!spice_mouse_press(event.button.button)
|
||||||
@ -553,9 +518,6 @@ int eventThread(void * arg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
#ifdef DEBUG_INPUT_STATE
|
|
||||||
state.mouse[event.button.button] = false;
|
|
||||||
#endif
|
|
||||||
if (
|
if (
|
||||||
!spice_mouse_position(event.button.x, event.button.y) ||
|
!spice_mouse_position(event.button.x, event.button.y) ||
|
||||||
!spice_mouse_release(event.button.button)
|
!spice_mouse_release(event.button.button)
|
||||||
|
Loading…
Reference in New Issue
Block a user