shithub: m8c

Download patch

ref: 3e48bc9cc224023820605085aff70bff5cd30c0c
parent: e512e08297b86058e7ec65d92211955c084533d4
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Tue Apr 15 17:02:24 EDT 2025

fix cicd build, hopefully

--- a/src/backends/audio_sdl.c
+++ b/src/backends/audio_sdl.c
@@ -83,7 +83,7 @@
     const char *device_name = SDL_GetAudioDeviceName(instance_id);
     SDL_LogDebug(SDL_LOG_CATEGORY_AUDIO, "%s", device_name);
     if (SDL_strstr(device_name, "M8") != NULL) {
-      SDL_Log("M8 Audio Input device found: %s", device_name);
+      SDL_LogInfo(SDL_LOG_CATEGORY_AUDIO, "M8 Audio Input device found: %s", device_name);
       m8_device_id = instance_id;
     }
   }
@@ -116,7 +116,8 @@
   char audio_buffer_size_str[256];
   SDL_snprintf(audio_buffer_size_str, sizeof(audio_buffer_size_str), "%d", audio_buffer_size);
   if (audio_buffer_size > 0) {
-    SDL_Log("Setting requested audio device sample frames to %d", audio_buffer_size);
+    SDL_LogInfo(SDL_LOG_CATEGORY_AUDIO, "Setting requested audio device sample frames to %d",
+                audio_buffer_size);
     SDL_SetHint(SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES, audio_buffer_size_str);
   }
 
@@ -131,9 +132,9 @@
     SDL_LogError(SDL_LOG_CATEGORY_AUDIO, "Error opening audio output device: %s", SDL_GetError());
     return 0;
   }
-  SDL_LogDebug(
-      SDL_LOG_CATEGORY_AUDIO, "Audiospec Out: format %d, channels %d, rate %d, buffer size %d",
-      audio_spec_out.format, audio_spec_out.channels, audio_spec_out.freq, audio_buffer_size_real);
+  SDL_LogInfo(SDL_LOG_CATEGORY_AUDIO,
+              "Opening audio output: rate %dhz, buffer size: %d sample frames", audio_spec_out.freq,
+              audio_buffer_size_real);
 
   audio_stream_in = SDL_OpenAudioDeviceStream(m8_device_id, &audio_spec_in, NULL, NULL);
   if (!audio_stream_in) {
--- a/src/gamecontrollers.c
+++ b/src/gamecontrollers.c
@@ -141,11 +141,11 @@
     if (SDL_GetGamepadButton(game_controllers[gc], conf->gamepad_quit) &&
         (SDL_GetGamepadButton(game_controllers[gc], conf->gamepad_select) ||
          SDL_GetGamepadAxis(game_controllers[gc], conf->gamepad_analog_axis_select)))
-      msg = (input_msg_s){special, msg_quit, 0, 0};
+      msg = (input_msg_s){special, msg_quit, 0};
     else if (SDL_GetGamepadButton(game_controllers[gc], conf->gamepad_reset) &&
              (SDL_GetGamepadButton(game_controllers[gc], conf->gamepad_select) ||
               SDL_GetGamepadAxis(game_controllers[gc], conf->gamepad_analog_axis_select)))
-      msg = (input_msg_s){special, msg_reset_display, 0, 0};
+      msg = (input_msg_s){special, msg_reset_display, 0};
   }
   return msg;
 }
\ No newline at end of file
--- a/src/input.c
+++ b/src/input.c
@@ -174,7 +174,7 @@
   return key;
 }
 
-void input_handle_key_down_event(struct app_context *ctx, SDL_Event *event) {
+void input_handle_key_down_event(struct app_context *ctx, const SDL_Event *event) {
   if (event->key.repeat > 0) {
     return;
   }
@@ -205,7 +205,7 @@
   input_process_and_send(ctx);
 }
 
-void input_handle_key_up_event(struct app_context *ctx, SDL_Event *event) {
+void input_handle_key_up_event(struct app_context *ctx, const SDL_Event *event) {
   key = handle_m8_keys(event, &ctx->conf);
   if (keyjazz_enabled) {
     key = handle_keyjazz(event, key.value, &ctx->conf);
--- a/src/input.h
+++ b/src/input.h
@@ -5,6 +5,7 @@
 #ifndef INPUT_H
 #define INPUT_H
 #include "config.h"
+#include "common.h"
 
 #include <SDL3/SDL_events.h>
 
@@ -48,7 +49,7 @@
 
 input_msg_s input_get_msg(config_params_s *conf);
 int input_process_and_send(struct app_context *ctx);
-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);
+void input_handle_key_down_event(struct app_context *ctx, const SDL_Event *event);
+void input_handle_key_up_event(struct app_context *ctx, const SDL_Event *event);
 
 #endif // INPUT_H
--- a/src/main.c
+++ b/src/main.c
@@ -26,7 +26,6 @@
 
   // Handle app suspension
   if (ctx->app_suspended) {
-    SDL_Delay(ctx->conf.idle_ms);
     return;
   }
 
--