aboutsummaryrefslogtreecommitdiff
path: root/platform/darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin.c')
-rw-r--r--platform/darwin.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/platform/darwin.c b/platform/darwin.c
index 3189a5d..2ffdbe3 100644
--- a/platform/darwin.c
+++ b/platform/darwin.c
@@ -45,7 +45,7 @@ void enter_idle(void)
}
/* TODO: probably also merge into a *nix module */
-struct board *load_board(char *board_name)
+bool load_board(struct board_state *state, char *board_name)
{
char so_name[100];
int r = snprintf(so_name, 100, "./board/%s.dylib", board_name);
@@ -60,16 +60,14 @@ struct board *load_board(char *board_name)
return false;
}
- fn_board_init board_init = dlsym(board_module, "board_init");
+ board_init_fn_t board_init = dlsym(board_module, "board_init");
if (board_init == NULL) {
printf("ERROR: No board initialisation function could be loaded.\n");
return false;
}
+ state->board_init = board_init;
- struct board_data data = {
- .sound_play = &sound_play
- };
- return board_init(data);
+ return true;
}
/* https://developer.apple.com/documentation/iokit/iohidvaluecallback */