mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Remove dead code that was replaced with VkToUnicode
This commit is contained in:
parent
bc3e4ba3db
commit
e5769d1666
@ -356,27 +356,6 @@ int get_unicode_from_scancode(KeyScancode scancode)
|
||||
if (tu.size() > 0)
|
||||
return tu[0];
|
||||
}
|
||||
|
||||
#if 0
|
||||
BYTE keystate[256];
|
||||
if (GetKeyboardState(&keystate[0])) {
|
||||
WCHAR buffer[8];
|
||||
int charsInBuffer = ToUnicode(vk, scancode, keystate, buffer,
|
||||
sizeof(buffer)/sizeof(buffer[0]), 0);
|
||||
|
||||
// ToUnicode() returns -1 if there is dead-key waiting
|
||||
if (charsInBuffer == -1) {
|
||||
return buffer[0];
|
||||
}
|
||||
// ToUnicode returns several characters inside the buffer in
|
||||
// case that a dead-key wasn't combined with the next pressed
|
||||
// character.
|
||||
else if (charsInBuffer > 0) {
|
||||
// return buffer[charsInBuffer-1];
|
||||
return buffer[0];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -335,18 +335,6 @@ namespace she {
|
||||
if (tu.size() != 0)
|
||||
tu.toUnicode(VK_SPACE, 0);
|
||||
}
|
||||
#if 0
|
||||
BYTE keystate[256];
|
||||
if (GetKeyboardState(keystate)) {
|
||||
WCHAR buffer[8];
|
||||
int charsInBuffer =
|
||||
ToUnicode(VK_SPACE, 0, keystate, buffer,
|
||||
sizeof(buffer)/sizeof(buffer[0]), 0);
|
||||
if (charsInBuffer != 0)
|
||||
ToUnicode(VK_SPACE, 0, keystate, buffer,
|
||||
sizeof(buffer)/sizeof(buffer[0]), 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
HWND handle() {
|
||||
@ -639,37 +627,6 @@ namespace she {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
BYTE keystate[256];
|
||||
if (GetKeyboardState(keystate)) {
|
||||
WCHAR buffer[8];
|
||||
|
||||
// ToUnicode can return several characters inside the
|
||||
// buffer in case that a dead-key wasn't combined with the
|
||||
// next pressed character.
|
||||
int charsInBuffer =
|
||||
ToUnicode(vk, scancode, keystate, buffer,
|
||||
sizeof(buffer)/sizeof(buffer[0]), 0);
|
||||
|
||||
// ToUnicode() returns -1 if there is dead-key waiting
|
||||
if (charsInBuffer == -1) {
|
||||
// Call again to remove dead-key
|
||||
ToUnicode(vk, scancode, keystate, buffer,
|
||||
sizeof(buffer)/sizeof(buffer[0]), 0);
|
||||
ev.setUnicodeChar(buffer[0]);
|
||||
}
|
||||
// ToUnicode returns several characters inside the buffer in
|
||||
// case that a dead-key wasn't combined with the next pressed
|
||||
// character.
|
||||
else if (charsInBuffer > 0) {
|
||||
sendMsg = false;
|
||||
for (int i=0; i<charsInBuffer; ++i) {
|
||||
ev.setUnicodeChar(buffer[i]);
|
||||
queueEvent(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (sendMsg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user