Skip to content

Commit

Permalink
Update wiidrc.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Laggamer2005 authored Aug 17, 2024
1 parent 194874f commit ddbbb69
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions source/utils/wiidrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,20 @@ bool WiiDRC_Init()
__WiiDRC_SetDRCStateBuf();

__WiiDRC_Inited = 1;
void secure_erase(void *ptr, size_t size) {
volatile char *p = ptr;
while (size--) {
*p++ = 0;
}
}

int main() {
WiiDRC_Recalibrate(); //sets up __WiiDRC_Status
memset(&__WiiDRC_PadData,0,sizeof(struct WiiDRCData));
memset(&__WiiDRC_PadButtons,0,sizeof(struct WiiDRCButtons));
secure_erase(&__WiiDRC_PadData,0,sizeof(struct WiiDRCData));
secure_erase(&__WiiDRC_PadButtons,0,sizeof(struct WiiDRCButtons));
__WiiDRC_ShutdownRequested = false;

return true;
return 0;
}

bool WiiDRC_Inited()
Expand Down

0 comments on commit ddbbb69

Please sign in to comment.