PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions | Variables
util.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <psxutil.h>

Functions

char * PSX_GetButtonName (unsigned short button, char *out, unsigned int out_len)
 Given a button bitmask, returns the name for the buttons that the bitmask reports activated.
 

Variables

const char * psxsdk_btn_names []
 

Function Documentation

char* PSX_GetButtonName ( unsigned short  button,
char *  out,
unsigned int  out_len 
)

Given a button bitmask, returns the name for the buttons that the bitmask reports activated.

If more than one button is found in the bitmask, it is specified by the symbol & followed by the other button name and so on...

Parameters
buttonButton bitmask as returned by PSX_ReadPad()
outPointer to a string, to which the button names will be output
out_lenThe maximum length of the string
Returns
The pointer to passed as the "out" parameter

Variable Documentation

const char* psxsdk_btn_names[]
Initial value:
=
{ "L2", "R2", "L1", "R1", "Triangle", "Circle", "Cross",
"Square", "Select", "Res1", "Res2", "Start",
"Up", "Right", "Down", "Left"}