usio: impl fake board name
This commit is contained in:
parent
77aa77496d
commit
5a130705d3
17
board/usio.c
17
board/usio.c
@ -25,6 +25,7 @@
|
||||
#include "util/dump.h"
|
||||
|
||||
static const wchar_t usio_path[] = L"$usio";
|
||||
static const wchar_t usio_name[] = L"NBGI.REAL_USIO";
|
||||
|
||||
static int my_bnusio_Open();
|
||||
static int my_bnusio_Close();
|
||||
@ -43,6 +44,7 @@ static int my_bnusio_GetCoin(uint8_t id);
|
||||
static int my_bnusio_GetCoinError(uint8_t id);
|
||||
static int my_bnusio_GetService(uint8_t id);
|
||||
static int my_bnusio_GetServiceError(uint8_t id);
|
||||
static intptr_t my_bnusio_GetIoBoardName();
|
||||
|
||||
static struct hook_symbol usio_syms[] = {
|
||||
{
|
||||
@ -113,6 +115,10 @@ static struct hook_symbol usio_syms[] = {
|
||||
.name = "bnusio_GetServiceError",
|
||||
.patch = my_bnusio_GetServiceError
|
||||
},
|
||||
{
|
||||
.name = "bnusio_GetIoBoardName",
|
||||
.patch = my_bnusio_GetIoBoardName
|
||||
},
|
||||
{
|
||||
.name = "Open",
|
||||
.patch = my_bnusio_Open
|
||||
@ -180,6 +186,10 @@ static struct hook_symbol usio_syms[] = {
|
||||
{
|
||||
.name = "GetServiceError",
|
||||
.patch = my_bnusio_GetServiceError
|
||||
},
|
||||
{
|
||||
.name = "GetIoBoardName",
|
||||
.patch = my_bnusio_GetIoBoardName
|
||||
}
|
||||
};
|
||||
|
||||
@ -357,3 +367,10 @@ static int my_bnusio_GetSwIn()
|
||||
|
||||
return opbtn_out;
|
||||
}
|
||||
|
||||
static intptr_t my_bnusio_GetIoBoardName()
|
||||
{
|
||||
intptr_t ret = (intptr_t)malloc(sizeof(usio_name) / 2);
|
||||
wcstombs((char *)ret, usio_name, sizeof(usio_name) / 2);
|
||||
return ret;
|
||||
}
|
Loading…
Reference in New Issue
Block a user