Tweak JVS coin count APIs

This makes things more consistent with the button/analog APIs.
This commit is contained in:
Tau
2019-08-03 17:41:39 -04:00
parent 40ba10e29a
commit 9ea6e09fdc
11 changed files with 53 additions and 25 deletions

View File

@ -23,8 +23,12 @@ HRESULT chuni_io_init(void)
return S_OK;
}
uint16_t chuni_io_jvs_read_coin_counter(void)
void chuni_io_jvs_read_coin_counter(uint16_t *out)
{
if (out == NULL) {
return;
}
if (GetAsyncKeyState('3')) {
if (!chuni_io_coin) {
chuni_io_coin = true;
@ -34,7 +38,7 @@ uint16_t chuni_io_jvs_read_coin_counter(void)
chuni_io_coin = false;
}
return chuni_io_coins;
*out = chuni_io_coins;
}
void chuni_io_jvs_poll(uint8_t *opbtn, uint8_t *beams)