In the hdls example, set the batteryCharge and added a comment.

This commit is contained in:
yellows8 2019-06-08 21:56:01 -04:00
parent b074eb7a4f
commit 7d45e89416
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43

View File

@ -55,6 +55,7 @@ int main(int argc, char* argv[])
device.singleColorButtons = RGBA8_MAXALPHA(0,0,0);
// Setup example controller state.
state.batteryCharge = 4; // Set battery charge to full.
state.buttons = KEY_A | KEY_ZR;
state.joysticks[JOYSTICK_LEFT].dx = 0x1234;
state.joysticks[JOYSTICK_LEFT].dy = -0x1234;
@ -85,6 +86,7 @@ int main(int argc, char* argv[])
// just pressed in this frame compared to the previous one
u64 kDown = hidKeysDown(conID);
// Set state for the controller. You can also use hiddbgApplyHdlsStateList for this.
if (R_SUCCEEDED(rc)) {
rc2 = hiddbgSetHdlsState(HdlsHandle, &state);
if (R_FAILED(rc2)) printf("hiddbgSetHdlsState(): 0x%x\n", rc2);