mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] omitting repeats is incorrect when comparing with the official client
This commit is contained in:
@@ -393,7 +393,6 @@ int eventThread(void * arg)
|
|||||||
bool serverMode = false;
|
bool serverMode = false;
|
||||||
int mouseX = 0;
|
int mouseX = 0;
|
||||||
int mouseY = 0;
|
int mouseY = 0;
|
||||||
int repeatCount = 0;
|
|
||||||
bool init = false;
|
bool init = false;
|
||||||
|
|
||||||
// ensure mouse acceleration is identical in server mode
|
// ensure mouse acceleration is identical in server mode
|
||||||
@@ -435,11 +434,6 @@ int eventThread(void * arg)
|
|||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
{
|
{
|
||||||
SDL_Scancode sc = event.key.keysym.scancode;
|
SDL_Scancode sc = event.key.keysym.scancode;
|
||||||
if (event.key.repeat)
|
|
||||||
++repeatCount;
|
|
||||||
else
|
|
||||||
repeatCount = 0;
|
|
||||||
|
|
||||||
if (sc == SDL_SCANCODE_SCROLLLOCK)
|
if (sc == SDL_SCANCODE_SCROLLLOCK)
|
||||||
{
|
{
|
||||||
if (event.key.repeat)
|
if (event.key.repeat)
|
||||||
@@ -475,10 +469,6 @@ int eventThread(void * arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (repeatCount != 0 && repeatCount != 100)
|
|
||||||
break;
|
|
||||||
|
|
||||||
repeatCount = 0;
|
|
||||||
uint32_t scancode = mapScancode(sc);
|
uint32_t scancode = mapScancode(sc);
|
||||||
if (scancode == 0)
|
if (scancode == 0)
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user