Clean up internal Unicode code point handling

Call code points by their name and store them as uint32_t.
This commit is contained in:
Camilla Löwy
2021-12-30 19:09:53 +01:00
parent 17a9e34fbc
commit fe7be39793
9 changed files with 43 additions and 42 deletions
+2 -2
View File
@@ -907,7 +907,7 @@ static const struct codepair {
// Convert XKB KeySym to Unicode
//
long _glfwKeySym2Unicode(unsigned int keysym)
uint32_t _glfwKeySym2Unicode(unsigned int keysym)
{
int min = 0;
int max = sizeof(keysymtab) / sizeof(struct codepair) - 1;
@@ -937,6 +937,6 @@ long _glfwKeySym2Unicode(unsigned int keysym)
}
// No matching Unicode value found
return -1;
return GLFW_INVALID_CODEPOINT;
}