Compare commits
No commits in common. "35f2245ed3feae3efca1ba0f32d6ee293977fcf4" and "500d51a077d33184f83c7248a8db357f9869cedf" have entirely different histories.
35f2245ed3
...
500d51a077
@ -2,7 +2,6 @@ cd /d %~dp0
|
|||||||
|
|
||||||
REM Edit this with the right path to vcvarsall.bat.
|
REM Edit this with the right path to vcvarsall.bat.
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
|
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64
|
|
||||||
meson setup build64 --buildtype=release
|
meson setup build64 --buildtype=release
|
||||||
meson configure build64
|
meson configure build64
|
||||||
ninja -C build64
|
ninja -C build64
|
||||||
|
@ -17,10 +17,6 @@ static bool HasCard = false;
|
|||||||
bool usingSmartCard = false;
|
bool usingSmartCard = false;
|
||||||
int readCooldown = 200;
|
int readCooldown = 200;
|
||||||
|
|
||||||
typedef(QRCALL_proc)(char id[21]);
|
|
||||||
QRCALL_proc *QRCALL;
|
|
||||||
HANDLE bnusio_dll;
|
|
||||||
|
|
||||||
typedef void (*callbackTouch)(i32, i32, u8[168], u64);
|
typedef void (*callbackTouch)(i32, i32, u8[168], u64);
|
||||||
callbackTouch touchCallback;
|
callbackTouch touchCallback;
|
||||||
u64 touchData;
|
u64 touchData;
|
||||||
@ -81,7 +77,7 @@ static unsigned int __stdcall reader_poll_thread_proc(void *ctx)
|
|||||||
{
|
{
|
||||||
printWarning("%s (%s): Read card %02X%02X%02X%02X%02X%02X%02X%02X\n", __func__, module, UID[0], UID[1], UID[2], UID[3], UID[4], UID[5], UID[6], UID[7]);
|
printWarning("%s (%s): Read card %02X%02X%02X%02X%02X%02X%02X%02X\n", __func__, module, UID[0], UID[1], UID[2], UID[3], UID[4], UID[5], UID[6], UID[7]);
|
||||||
|
|
||||||
if (waitingForTouch || QRCALL) // Check if game is waiting for a card or a qr code.
|
if (waitingForTouch) // Check if game is waiting for a card.
|
||||||
{
|
{
|
||||||
// Properly format the AccessID
|
// Properly format the AccessID
|
||||||
u64 ReversedAccessID;
|
u64 ReversedAccessID;
|
||||||
@ -157,17 +153,6 @@ void reader_runner_stop()
|
|||||||
|
|
||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
bnusio_dll = LoadLibrary(".\\bnusio.dll"); /*Explicit Load*/
|
|
||||||
if (bnusio_dll)
|
|
||||||
{
|
|
||||||
printWarning("%s (%s): Got bnusio !\n", __func__, module);
|
|
||||||
QRCALL = GetProcAddress(bnusio_dll, "qr_call");
|
|
||||||
if (QRCALL)
|
|
||||||
printWarning("%s (%s): Got QRCALL, using QR emulator !\n", __func__, module);
|
|
||||||
else
|
|
||||||
printWarning("%s (%s): Couldn't find QRCALL, using card emulator !\n", __func__, module);
|
|
||||||
}
|
|
||||||
|
|
||||||
printWarning("%s (%s): Starting HID Service...\n", __func__, module);
|
printWarning("%s (%s): Starting HID Service...\n", __func__, module);
|
||||||
|
|
||||||
// Read config
|
// Read config
|
||||||
@ -214,15 +199,9 @@ void Update()
|
|||||||
|
|
||||||
// Insert card in game
|
// Insert card in game
|
||||||
printInfo("%s (%s): Inserting Card %s, with ChipID %s\n", __func__, module, AccessID, ChipID);
|
printInfo("%s (%s): Inserting Card %s, with ChipID %s\n", __func__, module, AccessID, ChipID);
|
||||||
|
memcpy(cardData + 0x2C, ChipID, 33);
|
||||||
if (QRCALL)
|
memcpy(cardData + 0x50, AccessID, 21);
|
||||||
QRCALL(AccessID); // For CHN
|
touchCallback(0, 0, cardData, touchData);
|
||||||
else
|
|
||||||
{
|
|
||||||
memcpy(cardData + 0x2C, ChipID, 33);
|
|
||||||
memcpy(cardData + 0x50, AccessID, 21);
|
|
||||||
touchCallback(0, 0, cardData, touchData);
|
|
||||||
}
|
|
||||||
|
|
||||||
HasCard = false;
|
HasCard = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user