From ae999d1b83addfb2c3e15ac97e7c7c19b2c8545b Mon Sep 17 00:00:00 2001 From: Rakarake Date: Thu, 25 Dec 2025 22:42:07 +0100 Subject: [PATCH] formatting --- renderer.c | 12 ------------ wayland.c | 40 +++++++++++++++++++--------------------- 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/renderer.c b/renderer.c index c1b45a1..cdb071f 100644 --- a/renderer.c +++ b/renderer.c @@ -5,13 +5,6 @@ #include #include "renderer.h" -void checkGlError() { - //const char *err = SDL_GetError(); - //if (*err != 0) { - // printf("OpenGL error: %s", err); - //} -} - /// returns 0 if failed. GLuint compile_shader(GLuint type, const char *src) { GLuint id = glCreateShader(type); @@ -35,11 +28,6 @@ GLuint compile_shader(GLuint type, const char *src) { } const char *vertex_shader_src = -//"attribute vec4 vPosition; \n" -//"void main() \n" -//"{ \n" -//" gl_Position = vPosition; \n" -//"} \n"; "#version 320 es\n" "\n" "layout(location = 0) in vec2 aPos;\n" diff --git a/wayland.c b/wayland.c index 43b0a82..924b81e 100644 --- a/wayland.c +++ b/wayland.c @@ -3,9 +3,7 @@ #include #include "wayland.h" -static void -wl_buffer_release(void *data, struct wl_buffer *wl_buffer) -{ +static void wl_buffer_release(void *data, struct wl_buffer *wl_buffer) { /* Sent by the compositor when it's no longer using this buffer */ wl_buffer_destroy(wl_buffer); } @@ -14,10 +12,7 @@ static const struct wl_buffer_listener wl_buffer_listener = { .release = wl_buffer_release, }; -static void -xdg_surface_configure(void *data, - struct xdg_surface *xdg_surface, uint32_t serial) -{ +static void xdg_surface_configure(void *data, struct xdg_surface *xdg_surface, uint32_t serial) { struct client_state *state = data; xdg_surface_ack_configure(xdg_surface, serial); } @@ -26,10 +21,10 @@ static const struct xdg_surface_listener xdg_surface_listener = { .configure = xdg_surface_configure, }; -static void -xdg_wm_base_ping(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial) -{ - xdg_wm_base_pong(xdg_wm_base, serial); } +static void xdg_wm_base_ping(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial) { + xdg_wm_base_pong(xdg_wm_base, serial); +} + static const struct xdg_wm_base_listener xdg_wm_base_listener = { .ping = xdg_wm_base_ping, }; @@ -59,10 +54,13 @@ static const struct xdg_toplevel_listener xdg_toplevel_listener = { .close = xdg_toplevel_close, }; -static void -registry_handle_global(void *data, struct wl_registry *registry, - uint32_t name, const char *interface, uint32_t version) -{ +static void registry_handle_global( + void *data, + struct wl_registry *registry, + uint32_t name, + const char *interface, + uint32_t version + ) { printf("interface: '%s', version: %d, name: %d\n", interface, version, name); @@ -96,15 +94,15 @@ registry_handle_global(void *data, struct wl_registry *registry, } } -static void -registry_handle_global_remove(void *data, struct wl_registry *registry, - uint32_t name) -{ +static void registry_handle_global_remove( + void *data, + struct wl_registry *registry, + uint32_t name + ) { // This space deliberately left blank } -static const struct wl_registry_listener -wl_registry_listener = { +static const struct wl_registry_listener wl_registry_listener = { .global = registry_handle_global, .global_remove = registry_handle_global_remove, };