Screen game button types

Updated: October 26, 2022

Types of game buttons

Synopsis:

#include <screen/screen.h>
enum {
    SCREEN_A_GAME_BUTTON = (1 << 0),
    SCREEN_B_GAME_BUTTON = (1 << 1),
    SCREEN_C_GAME_BUTTON = (1 << 2),
    SCREEN_X_GAME_BUTTON = (1 << 3),
    SCREEN_Y_GAME_BUTTON = (1 << 4),
    SCREEN_Z_GAME_BUTTON = (1 << 5),
    SCREEN_MENU1_GAME_BUTTON = (1 << 6),
    SCREEN_MENU2_GAME_BUTTON = (1 << 7),
    SCREEN_MENU3_GAME_BUTTON = (1 << 8),
    SCREEN_MENU4_GAME_BUTTON = (1 << 9),
    SCREEN_L1_GAME_BUTTON = (1 << 10),
    SCREEN_L2_GAME_BUTTON = (1 << 11),
    SCREEN_L3_GAME_BUTTON = (1 << 12),
    SCREEN_R1_GAME_BUTTON = (1 << 13),
    SCREEN_R2_GAME_BUTTON = (1 << 14),
    SCREEN_R3_GAME_BUTTON = (1 << 15),
    SCREEN_DPAD_UP_GAME_BUTTON = (1 << 16),
    SCREEN_DPAD_DOWN_GAME_BUTTON = (1 << 17),
    SCREEN_DPAD_LEFT_GAME_BUTTON = (1 << 18),
    SCREEN_DPAD_RIGHT_GAME_BUTTON = (1 << 19)
};

Data:

SCREEN_A_GAME_BUTTON
Button A on a game controller.
SCREEN_B_GAME_BUTTON
Button B on a game controller.
SCREEN_C_GAME_BUTTON
Button C on a game controller.
SCREEN_X_GAME_BUTTON
Button X on a game controller.
SCREEN_Y_GAME_BUTTON
Button Y on a game controller.
SCREEN_Z_GAME_BUTTON
Button Z on a game controller.
SCREEN_MENU1_GAME_BUTTON
Menu 1 button on a game controller.
SCREEN_MENU2_GAME_BUTTON
Menu 2 button on a game controller.
SCREEN_MENU3_GAME_BUTTON
Menu 3 button on a game controller.
SCREEN_MENU4_GAME_BUTTON
Menu 4 button on a game controller.
SCREEN_L1_GAME_BUTTON
L1 button on a game controller.
SCREEN_L2_GAME_BUTTON
L2 button on a game controller.
SCREEN_L3_GAME_BUTTON
L3 button on a game controller.
SCREEN_R1_GAME_BUTTON
R1 button on a game controller.
SCREEN_R2_GAME_BUTTON
R2 button on a game controller.
SCREEN_R3_GAME_BUTTON
R3 button on a game controller.
SCREEN_DPAD_UP_GAME_BUTTON
Up direction of the directional pad on a game controller.
SCREEN_DPAD_DOWN_GAME_BUTTON
Down direction of the directional pad on a game controller.
SCREEN_DPAD_LEFT_GAME_BUTTON
Left direction of the directional pad on a game controller.
SCREEN_DPAD_RIGHT_GAME_BUTTON
Right direction of the directional pad on a game controller.

Library:

libscreen

Description:

These enumerator values are used as constants to map buttons from different controllers to a common game control layout. Typically, you create a structure to represent your game controller and map the buttons to constants in this enumeration.