diff options
| author | Xavi Del Campo <xavi.dcr@tutanota.com> | 2020-01-31 10:32:23 +0100 |
|---|---|---|
| committer | Xavi Del Campo <xavi.dcr@tutanota.com> | 2020-01-31 10:32:23 +0100 |
| commit | 7c24e9a9b02b04dcaf9507acb94091ea70a2c02d (patch) | |
| tree | c28d0748652ad4b4222309e46e6cfc82c0906220 /libpsx/include/psxutil.h | |
| parent | a2b7b6bb1cc2f4a3258b7b2dbc92399d151f864d (diff) | |
| download | psxsdk-7c24e9a9b02b04dcaf9507acb94091ea70a2c02d.tar.gz | |
Imported pristine psxsdk-20190410 from official repo
Diffstat (limited to 'libpsx/include/psxutil.h')
| -rw-r--r-- | libpsx/include/psxutil.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libpsx/include/psxutil.h b/libpsx/include/psxutil.h new file mode 100644 index 0000000..0dba29e --- /dev/null +++ b/libpsx/include/psxutil.h @@ -0,0 +1,20 @@ +// psxutil.h
+
+#ifndef _PSXUTIL_H
+#define _PSXUTIL_H
+
+/**
+ * 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...
+ *
+ * @param button Button bitmask as returned by PSX_ReadPad()
+ * @param out Pointer to a string, to which the button names will be output
+ * @param out_len The maximum length of the string
+ * @return The pointer to passed as the "out" parameter
+ */
+
+char *PSX_GetButtonName(unsigned short button, char *out, unsigned int out_len);
+
+#endif
|
