libnx  v4.6.0
Data Structures | Enumerations | Functions
hid_la.h File Reference

Wrapper for using the controller LibraryApplet. More...

#include "../types.h"
#include "../services/hid.h"

Go to the source code of this file.

Data Structures

struct  HidLaControllerSupportArgPrivate
 ControllerSupportArgPrivate. More...
 
struct  HidLaControllerSupportArgHeader
 Common header used by HidLaControllerSupportArg*. More...
 
struct  HidLaControllerSupportArgColor
 Identification color used by HidLaControllerSupportArg*. When HidLaControllerSupportArgHeader::enable_identification_color is set this controls the color of the UI player box outline. More...
 
struct  HidLaControllerSupportArgV3
 ControllerSupportArg for [1.0.0+]. More...
 
struct  HidLaControllerSupportArg
 ControllerSupportArg for [8.0.0+], converted to HidLaControllerSupportArgV3 on pre-8.0.0. More...
 
struct  HidLaControllerFirmwareUpdateArg
 ControllerFirmwareUpdateArg. More...
 
struct  HidLaControllerKeyRemappingArg
 ControllerKeyRemappingArg. More...
 
struct  HidLaControllerSupportResultInfo
 ControllerSupportResultInfo. First 8-bytes from the applet output storage. More...
 
struct  HidLaControllerSupportResultInfoInternal
 Struct for the applet output storage. More...
 

Enumerations

enum  HidLaControllerSupportMode {
  HidLaControllerSupportMode_ShowControllerSupport = 0 ,
  HidLaControllerSupportMode_ShowControllerStrapGuide = 1 ,
  HidLaControllerSupportMode_ShowControllerFirmwareUpdate = 2 ,
  HidLaControllerSupportMode_ShowControllerKeyRemappingForSystem = 4
}
 Mode values for HidLaControllerSupportArgPrivate::mode. More...
 
enum  HidLaControllerSupportCaller {
  HidLaControllerSupportCaller_Application = 0 ,
  HidLaControllerSupportCaller_System = 1
}
 ControllerSupportCaller. More...
 

Functions

void hidLaCreateControllerSupportArg (HidLaControllerSupportArg *arg)
 Initializes a HidLaControllerSupportArg with the defaults. More...
 
void hidLaCreateControllerFirmwareUpdateArg (HidLaControllerFirmwareUpdateArg *arg)
 Initializes a HidLaControllerFirmwareUpdateArg with the defaults. More...
 
void hidLaCreateControllerKeyRemappingArg (HidLaControllerKeyRemappingArg *arg)
 Initializes a HidLaControllerKeyRemappingArg with the defaults. More...
 
Result hidLaSetExplainText (HidLaControllerSupportArg *arg, const char *str, HidNpadIdType id)
 Sets the ExplainText for the specified player and HidLaControllerSupportArg. More...
 
Result hidLaShowControllerSupport (HidLaControllerSupportResultInfo *result_info, const HidLaControllerSupportArg *arg)
 Launches the applet for ControllerSupport. More...
 
Result hidLaShowControllerStrapGuide (void)
 Launches the applet for ControllerStrapGuide. More...
 
Result hidLaShowControllerFirmwareUpdate (const HidLaControllerFirmwareUpdateArg *arg)
 Launches the applet for ControllerFirmwareUpdate. More...
 
Result hidLaShowControllerSupportForSystem (HidLaControllerSupportResultInfo *result_info, const HidLaControllerSupportArg *arg, bool flag)
 This is the system version of hidLaShowControllerSupport. More...
 
Result hidLaShowControllerFirmwareUpdateForSystem (const HidLaControllerFirmwareUpdateArg *arg, HidLaControllerSupportCaller caller)
 This is the system version of hidLaShowControllerFirmwareUpdate. More...
 
Result hidLaShowControllerKeyRemappingForSystem (const HidLaControllerKeyRemappingArg *arg, HidLaControllerSupportCaller caller)
 Launches the applet for ControllerKeyRemappingForSystem. More...
 

Detailed Description

Wrapper for using the controller LibraryApplet.

Author
yellows8

Enumeration Type Documentation

◆ HidLaControllerSupportCaller

ControllerSupportCaller.

Enumerator
HidLaControllerSupportCaller_Application 

Application, this is the default.

HidLaControllerSupportCaller_System 

System. Skips the firmware-update confirmation dialog. This has the same affect as using the controller-update option from qlaunch System Settings.

◆ HidLaControllerSupportMode

Mode values for HidLaControllerSupportArgPrivate::mode.

Enumerator
HidLaControllerSupportMode_ShowControllerSupport 

ShowControllerSupport.

HidLaControllerSupportMode_ShowControllerStrapGuide 

[3.0.0+] ShowControllerStrapGuide

HidLaControllerSupportMode_ShowControllerFirmwareUpdate 

[3.0.0+] ShowControllerFirmwareUpdate

HidLaControllerSupportMode_ShowControllerKeyRemappingForSystem 

[11.0.0+] ShowControllerKeyRemappingForSystem

Function Documentation

◆ hidLaCreateControllerFirmwareUpdateArg()

void hidLaCreateControllerFirmwareUpdateArg ( HidLaControllerFirmwareUpdateArg arg)

Initializes a HidLaControllerFirmwareUpdateArg with the defaults.

Note
This just uses memset() with the arg.
Parameters
[out]argHidLaControllerFirmwareUpdateArg

◆ hidLaCreateControllerKeyRemappingArg()

void hidLaCreateControllerKeyRemappingArg ( HidLaControllerKeyRemappingArg arg)

Initializes a HidLaControllerKeyRemappingArg with the defaults.

Note
This just uses memset() with the arg.
Parameters
[out]argHidLaControllerKeyRemappingArg

◆ hidLaCreateControllerSupportArg()

void hidLaCreateControllerSupportArg ( HidLaControllerSupportArg arg)

◆ hidLaSetExplainText()

Result hidLaSetExplainText ( HidLaControllerSupportArg arg,
const char *  str,
HidNpadIdType  id 
)

Sets the ExplainText for the specified player and HidLaControllerSupportArg.

Note
This string is displayed in the UI box for the player.
HidLaControllerSupportArg::enable_explain_text must be set, otherwise this ExplainText is ignored.
Parameters
argHidLaControllerSupportArg
[in]strInput ExplainText UTF-8 string, max length is 0x80 excluding NUL-terminator.
  • @oaram[in] id Player controller, must be <8.

◆ hidLaShowControllerFirmwareUpdate()

Result hidLaShowControllerFirmwareUpdate ( const HidLaControllerFirmwareUpdateArg arg)

Launches the applet for ControllerFirmwareUpdate.

Note
Only available on [3.0.0+].
Parameters
[in]argHidLaControllerFirmwareUpdateArg

◆ hidLaShowControllerFirmwareUpdateForSystem()

Result hidLaShowControllerFirmwareUpdateForSystem ( const HidLaControllerFirmwareUpdateArg arg,
HidLaControllerSupportCaller  caller 
)

This is the system version of hidLaShowControllerFirmwareUpdate.

Note
Only available on [3.0.0+].
Parameters
[in]argHidLaControllerFirmwareUpdateArg
[in]callerHidLaControllerSupportCaller

◆ hidLaShowControllerKeyRemappingForSystem()

Result hidLaShowControllerKeyRemappingForSystem ( const HidLaControllerKeyRemappingArg arg,
HidLaControllerSupportCaller  caller 
)

Launches the applet for ControllerKeyRemappingForSystem.

Note
Only available on [11.0.0+].
Parameters
[in]argHidLaControllerKeyRemappingArg
[in]callerHidLaControllerSupportCaller

◆ hidLaShowControllerStrapGuide()

Result hidLaShowControllerStrapGuide ( void  )

Launches the applet for ControllerStrapGuide.

Note
Only available on [3.0.0+].

◆ hidLaShowControllerSupport()

Result hidLaShowControllerSupport ( HidLaControllerSupportResultInfo result_info,
const HidLaControllerSupportArg arg 
)

Launches the applet for ControllerSupport.

Note
This seems to only display the applet UI when doing so is actually needed? This doesn't apply to hidLaShowControllerSupportForSystem.
Parameters
[out]result_infoHidLaControllerSupportResultInfo. Optional, can be NULL.
[in]argHidLaControllerSupportArg

◆ hidLaShowControllerSupportForSystem()

Result hidLaShowControllerSupportForSystem ( HidLaControllerSupportResultInfo result_info,
const HidLaControllerSupportArg arg,
bool  flag 
)

This is the system version of hidLaShowControllerSupport.

Parameters
[out]result_infoHidLaControllerSupportResultInfo. Optional, can be NULL.
[in]argHidLaControllerSupportArg
[in]flagInput flag. When true, the applet displays the menu as if launched by qlaunch.