mirror of
https://github.com/FIX94/libwiidrc.git
synced 2024-11-22 09:39:20 +01:00
updated demo
This commit is contained in:
parent
0572b2d93d
commit
5f5b35f419
@ -32,12 +32,20 @@ int main(int argc, char *argv[])
|
||||
PAD_Init();
|
||||
WPAD_Init();
|
||||
WiiDRC_Init();
|
||||
bool inited = WiiDRC_Inited();
|
||||
bool connected = false;
|
||||
if(inited) //Wii VC can start with gamepad off
|
||||
connected = WiiDRC_Connected();
|
||||
while(1)
|
||||
{
|
||||
printf("\x1b[2J");
|
||||
printf("\x1b[37m");
|
||||
printf("WiiDRC v1.0 Demo by FIX94\n");
|
||||
printf("WiiDRC v1.1 Demo by FIX94\n");
|
||||
printf("Press any button on a real Wiimote to exit\n");
|
||||
if(inited)
|
||||
{
|
||||
if(connected)
|
||||
{
|
||||
WiiDRC_ScanPads();
|
||||
const struct WiiDRCData *drcdat = WiiDRC_Data();
|
||||
printf("Left Stick X: %i, Y: %i; Right Stick X: %i, Y: %i\n",
|
||||
@ -60,6 +68,12 @@ int main(int argc, char *argv[])
|
||||
if(drcdat->extra & WIIDRC_EXTRA_BUTTON_L3) printf("L3 pressed\n");
|
||||
if(drcdat->extra & WIIDRC_EXTRA_BUTTON_R3) printf("R3 pressed\n");
|
||||
if(drcdat->extra & WIIDRC_EXTRA_BUTTON_TV) printf("TV pressed\n");
|
||||
}
|
||||
else
|
||||
printf("Gamepad was not enabled when starting Wii VC.\n");
|
||||
}
|
||||
else
|
||||
printf("Not started in Wii VC or used fw.img was not patched for homebrew use.\n");
|
||||
VIDEO_WaitVSync();
|
||||
VIDEO_WaitVSync();
|
||||
PAD_ScanPads();
|
||||
|
Loading…
Reference in New Issue
Block a user