2021-12-21 06:02:17 +01:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <limits.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "mercuryio/mercuryio.h"
|
|
|
|
#include "mercuryio/config.h"
|
|
|
|
|
|
|
|
static uint8_t mercury_opbtn;
|
|
|
|
static struct mercury_io_config mercury_io_cfg;
|
|
|
|
|
|
|
|
uint16_t mercury_io_get_api_version(void)
|
|
|
|
{
|
|
|
|
return 0x0100;
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT mercury_io_init(void)
|
|
|
|
{
|
|
|
|
mercury_io_config_load(&mercury_io_cfg, L".\\segatools.ini");
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT mercury_io_poll(void)
|
|
|
|
{
|
|
|
|
mercury_opbtn = 0;
|
|
|
|
|
|
|
|
if (GetAsyncKeyState(mercury_io_cfg.vk_test)) {
|
2021-12-23 05:23:42 +01:00
|
|
|
mercury_opbtn |= MERCURY_IO_OPBTN_TEST;
|
2021-12-21 06:02:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (GetAsyncKeyState(mercury_io_cfg.vk_service)) {
|
2021-12-23 05:23:42 +01:00
|
|
|
mercury_opbtn |= MERCURY_IO_OPBTN_SERVICE;
|
2021-12-21 06:02:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void mercury_io_get_opbtns(uint8_t *opbtn)
|
|
|
|
{
|
|
|
|
if (opbtn != NULL) {
|
|
|
|
*opbtn = mercury_opbtn;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void mercury_io_get_gamebtns(uint16_t *player1, uint16_t *player2)
|
|
|
|
{
|
2021-12-30 06:51:44 +01:00
|
|
|
|
|
|
|
}
|
2021-12-30 19:57:05 +01:00
|
|
|
|
2022-01-04 06:10:46 +01:00
|
|
|
HRESULT mercury_io_touch_init(void)
|
2021-12-30 19:57:05 +01:00
|
|
|
{
|
|
|
|
return S_OK;
|
|
|
|
}
|