mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Clean up internal Unicode code point handling
Call code points by their name and store them as uint32_t.
(cherry picked from commit fe7be39793)
This commit is contained in:
+3
-3
@@ -1387,15 +1387,15 @@ const char* _glfwPlatformGetScancodeName(int scancode)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const long codepoint = _glfwKeySym2Unicode(keysyms[0]);
|
||||
if (codepoint == -1)
|
||||
const uint32_t codepoint = _glfwKeySym2Unicode(keysyms[0]);
|
||||
if (codepoint == GLFW_INVALID_CODEPOINT)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Failed to retrieve codepoint for key name");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const size_t count = _glfwEncodeUTF8(_glfw.wl.keynames[key], (unsigned int) codepoint);
|
||||
const size_t count = _glfwEncodeUTF8(_glfw.wl.keynames[key], codepoint);
|
||||
if (count == 0)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user