From f03c3260ce580194f38f794aaee163b25f211b26 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Tue, 13 Aug 2024 15:15:48 +0200 Subject: [PATCH] rename global window to member window in ptk.c --- src/ptk.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ptk.c b/src/ptk.c index 3385463..3e39d89 100644 --- a/src/ptk.c +++ b/src/ptk.c @@ -21,7 +21,7 @@ #include #include -static GLFWwindow *g_window = NULL; +static GLFWwindow *m_window = NULL; static void framebuffer_resize_callback(GLFWwindow *window, int width, int height) { (void)window; (void)width; (void)height; @@ -111,20 +111,20 @@ bool ptk_init(const size_t width, const size_t height, const char *title, const glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); - g_window = glfwCreateWindow(width, height, title, NULL, NULL); + m_window = glfwCreateWindow(width, height, title, NULL, NULL); - if (g_window == NULL) { + if (m_window == NULL) { PTK_ERR("failed creating GLFW window"); return false; } - glfwSetFramebufferSizeCallback(g_window, framebuffer_resize_callback); - glfwSetKeyCallback(g_window, key_callback); - glfwSetMouseButtonCallback(g_window, mouse_button_callback); + glfwSetFramebufferSizeCallback(m_window, framebuffer_resize_callback); + glfwSetKeyCallback(m_window, key_callback); + glfwSetMouseButtonCallback(m_window, mouse_button_callback); vk_components_init(); - if (!vk_init(g_window, width, height, title, application_version)) { + if (!vk_init(m_window, width, height, title, application_version)) { PTK_ERR("failed initializing vulkan"); return false; } @@ -210,7 +210,7 @@ void init_component(PtkHandle component) { int ptk_run(PtkHandle root) { init_component(root); - while (!glfwWindowShouldClose(g_window)) { + while (!glfwWindowShouldClose(m_window)) { glfwPollEvents(); if (!vk_draw_frame()) { break;