mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
Added hidGetHandheldMode().
This commit is contained in:
parent
0d5bf5ab7b
commit
213676c5f8
@ -581,6 +581,10 @@ void hidTouchRead(touchPosition *pos, u32 point_id);
|
||||
|
||||
void hidJoystickRead(JoystickPosition *pos, HidControllerID id, HidControllerJoystick stick);
|
||||
|
||||
/// This can be used to check what CONTROLLER_P1_AUTO uses.
|
||||
/// Returns 0 when CONTROLLER_PLAYER_1 is connected, otherwise returns 1 for handheld-mode.
|
||||
bool hidGetHandheldMode(void);
|
||||
|
||||
/// Use this if you want to use a single joy-con as a dedicated CONTROLLER_PLAYER_*.
|
||||
/// When used, both joy-cons in a pair should be used with this (CONTROLLER_PLAYER_1 and CONTROLLER_PLAYER_2 for example).
|
||||
/// id must be CONTROLLER_PLAYER_*.
|
||||
|
@ -370,6 +370,10 @@ void hidJoystickRead(JoystickPosition *pos, HidControllerID id, HidControllerJoy
|
||||
}
|
||||
}
|
||||
|
||||
bool hidGetHandheldMode(void) {
|
||||
return g_controllerP1AutoID == CONTROLLER_HANDHELD;
|
||||
}
|
||||
|
||||
static Result _hidSetDualModeAll(void) {
|
||||
Result rc;
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user