forked from TeamTofuShop/segatools
chuni/chusan: added LED output to DLLs (will break most DLLs)
Credits: somewhatlurker, skogaby https://dev.s-ul.net/skogaby/segatools/-/blob/ongeki-15093/
This commit is contained in:
@ -30,6 +30,12 @@ const struct dll_bind_sym chuni_dll_syms[] = {
|
||||
}, {
|
||||
.sym = "chuni_io_slider_set_leds",
|
||||
.off = offsetof(struct chuni_dll, slider_set_leds),
|
||||
}, {
|
||||
.sym = "chuni_io_led_init",
|
||||
.off = offsetof(struct chuni_dll, led_init),
|
||||
}, {
|
||||
.sym = "chuni_io_led_set_colors",
|
||||
.off = offsetof(struct chuni_dll, led_set_leds),
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -13,6 +13,8 @@ struct chuni_dll {
|
||||
void (*slider_start)(chuni_io_slider_callback_t callback);
|
||||
void (*slider_stop)(void);
|
||||
void (*slider_set_leds)(const uint8_t *rgb);
|
||||
int (*led_init)();
|
||||
void (*led_set_leds)(uint8_t board, uint8_t *rgb);
|
||||
};
|
||||
|
||||
struct chuni_dll_config {
|
||||
|
@ -20,3 +20,5 @@ EXPORTS
|
||||
chuni_io_slider_set_leds
|
||||
chuni_io_slider_start
|
||||
chuni_io_slider_stop
|
||||
chuni_io_led_init
|
||||
chuni_io_led_set_colors
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "amex/amex.h"
|
||||
|
||||
#include "board/led15093.h"
|
||||
#include "board/sg-reader.h"
|
||||
|
||||
#include "chunihook/config.h"
|
||||
@ -96,7 +97,8 @@ static DWORD CALLBACK chuni_pre_startup(void)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
hr = led15093_hook_init(&chuni_hook_cfg.led15093, 10, 2, 2, 1);
|
||||
hr = led15093_hook_init(&chuni_hook_cfg.led15093,
|
||||
chuni_dll.led_init, chuni_dll.led_set_leds, 10, 2, 2, 1);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
goto fail;
|
||||
|
Reference in New Issue
Block a user