mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Fixed and clarified invalid char tests.
This commit is contained in:
parent
2469a1bac9
commit
aec952e8dc
@ -140,8 +140,10 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action)
|
|||||||
|
|
||||||
void _glfwInputChar(_GLFWwindow* window, unsigned int character)
|
void _glfwInputChar(_GLFWwindow* window, unsigned int character)
|
||||||
{
|
{
|
||||||
// Valid Unicode (ISO 10646) character?
|
if (character == -1)
|
||||||
if (!((character >= 32 && character <= 126) || character >= 160))
|
return;
|
||||||
|
|
||||||
|
if (character < 32 || (character > 126 && character < 160))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (window->callbacks.character)
|
if (window->callbacks.character)
|
||||||
|
Loading…
Reference in New Issue
Block a user