From 8596a5db729eea07b31804d0421fd5536cbefcd3 Mon Sep 17 00:00:00 2001 From: Milan Nikolic Date: Mon, 26 Feb 2024 09:25:40 +0100 Subject: [PATCH] Rename wayland functions --- raylib/external/glfw/src/wl_init.c | 4 ++-- raylib/external/glfw/src/wl_window.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/raylib/external/glfw/src/wl_init.c b/raylib/external/glfw/src/wl_init.c index 3aff476..c017322 100644 --- a/raylib/external/glfw/src/wl_init.c +++ b/raylib/external/glfw/src/wl_init.c @@ -257,7 +257,7 @@ static const struct wl_callback_listener libdecorReadyListener = // Create key code translation tables // -static void createKeyTables(void) +static void createKeyTablesWL(void) { memset(_glfw.wl.keycodes, -1, sizeof(_glfw.wl.keycodes)); memset(_glfw.wl.scancodes, -1, sizeof(_glfw.wl.scancodes)); @@ -821,7 +821,7 @@ int _glfwInitWayland(void) _glfw.wl.registry = wl_display_get_registry(_glfw.wl.display); wl_registry_add_listener(_glfw.wl.registry, ®istryListener, NULL); - createKeyTables(); + createKeyTablesWL(); _glfw.wl.xkb.context = xkb_context_new(0); if (!_glfw.wl.xkb.context) diff --git a/raylib/external/glfw/src/wl_window.c b/raylib/external/glfw/src/wl_window.c index 5b491ff..8721992 100644 --- a/raylib/external/glfw/src/wl_window.c +++ b/raylib/external/glfw/src/wl_window.c @@ -498,7 +498,7 @@ static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable) // Make the specified window and its video mode active on its monitor // -static void acquireMonitor(_GLFWwindow* window) +static void acquireMonitorWL(_GLFWwindow* window) { if (window->wl.libdecor.frame) { @@ -519,7 +519,7 @@ static void acquireMonitor(_GLFWwindow* window) // Remove the window and restore the original video mode // -static void releaseMonitor(_GLFWwindow* window) +static void releaseMonitorWL(_GLFWwindow* window) { if (window->wl.libdecor.frame) libdecor_frame_unset_fullscreen(window->wl.libdecor.frame); @@ -1156,7 +1156,7 @@ static GLFWbool flushDisplay(void) return GLFW_TRUE; } -static int translateKey(uint32_t scancode) +static int translateKeyWL(uint32_t scancode) { if (scancode < sizeof(_glfw.wl.keycodes) / sizeof(_glfw.wl.keycodes[0])) return _glfw.wl.keycodes[scancode]; @@ -1270,7 +1270,7 @@ static void handleEvents(double* timeout) for (uint64_t i = 0; i < repeats; i++) { _glfwInputKey(_glfw.wl.keyboardFocus, - translateKey(_glfw.wl.keyRepeatScancode), + translateKeyWL(_glfw.wl.keyRepeatScancode), _glfw.wl.keyRepeatScancode, GLFW_PRESS, _glfw.wl.xkb.modifiers); @@ -1773,7 +1773,7 @@ static void keyboardHandleKey(void* userData, if (!window) return; - const int key = translateKey(scancode); + const int key = translateKeyWL(scancode); const int action = state == WL_KEYBOARD_KEY_STATE_PRESSED ? GLFW_PRESS : GLFW_RELEASE; @@ -2509,12 +2509,12 @@ void _glfwSetWindowMonitorWayland(_GLFWwindow* window, } if (window->monitor) - releaseMonitor(window); + releaseMonitorWL(window); _glfwInputWindowMonitor(window, monitor); if (window->monitor) - acquireMonitor(window); + acquireMonitorWL(window); else _glfwSetWindowSizeWayland(window, width, height); }