Fix Dolphin crash

This commit is contained in:
2026-03-11 07:27:06 -05:00
parent 9b87dfa1a9
commit 5bd43a4643
9 changed files with 27 additions and 8 deletions
+1
View File
@@ -22,6 +22,7 @@ void debugPrint(const char_t *message, ...) {
va_copy(copy, args);
vfprintf(stdout, message, copy);
va_end(copy);
fflush(stdout);
// Append to buffer
vsnprintf(
+7
View File
@@ -7,6 +7,7 @@
#include "input/input.h"
#include "assert/assert.h"
#include "debug/debug.h"
inputbuttondata_t INPUT_BUTTON_DATA[] = {
#ifdef DUSK_INPUT_GAMEPAD
@@ -38,6 +39,12 @@ inputbuttondata_t INPUT_BUTTON_DATA[] = {
{ .name = NULL }
};
errorret_t inputInitDolphin(void) {
PAD_Init();
errorOk();
}
void inputUpdateDolphin(void) {
PAD_ScanPads();
+8
View File
@@ -7,6 +7,7 @@
#pragma once
#include "dusk.h"
#include "error/error.h"
#define INPUT_DOLPHIN_PAD_COUNT PAD_CHANMAX
#define INPUT_DOLPHIN_AXIS(value) ((float_t)(value) / 128.0f)
@@ -44,6 +45,13 @@ typedef struct {
#endif
} inputdolphin_t;
/**
* Initializes the input system for Dolphin.
*
* @return An error code if initialization fails.
*/
errorret_t inputInitDolphin(void);
/**
* Updates the input state for Dolphin.
*/
+1
View File
@@ -15,5 +15,6 @@
typedef inputdolphin_t inputplatform_t;
#define inputInitPlatform inputInitDolphin
#define inputUpdatePlatform inputUpdateDolphin
#define inputButtonGetValuePlatform inputButtonGetValueDolphin