shithub: m8c

Download patch

ref: e512e08297b86058e7ec65d92211955c084533d4
parent: 68e4735c924239b68c7713a1ebf17235aa1257d4
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Tue Apr 15 14:28:26 EDT 2025

clean up formatting, include config.h in input.h

--- a/src/input.c
+++ b/src/input.c
@@ -1,14 +1,13 @@
 //
 // Created by Jonne Kokkonen on 15.4.2025.
 //
-#include <SDL3/SDL.h>
-#include "common.h"
 #include "input.h"
-#include "render.h"
 #include "backends/audio.h"
 #include "backends/m8.h"
+#include "common.h"
+#include "render.h"
+#include <SDL3/SDL.h>
 
-
 static unsigned char keyjazz_enabled = 0;
 static unsigned char keyjazz_base_octave = 2;
 static unsigned char keyjazz_velocity = 0x7F;
@@ -97,7 +96,7 @@
   // Check if this is a note key
   const int note_value = get_note_for_scancode(event->key.scancode);
   if (note_value >= 0) {
-    SDL_Log("vel %d",keyjazz_velocity);
+    SDL_Log("vel %d", keyjazz_velocity);
     key.value = note_value;
     return key;
   }
--- a/src/input.h
+++ b/src/input.h
@@ -4,6 +4,8 @@
 
 #ifndef INPUT_H
 #define INPUT_H
+#include "config.h"
+
 #include <SDL3/SDL_events.h>
 
 typedef enum input_buttons_t {
@@ -49,5 +51,4 @@
 void input_handle_key_down_event(struct app_context *ctx, SDL_Event *event);
 void input_handle_key_up_event(struct app_context *ctx, SDL_Event *event);
 
-
-#endif //INPUT_H
+#endif // INPUT_H
--