mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Add controller button layout mappings
This adds mappings from SDL's Xbox-based SDL_GameControllerButton constants, to glyphs for the following layouts: - LAYOUT_NINTENDO_SWITCH_PRO, - LAYOUT_NINTENDO_SWITCH_JOYCON_L, - LAYOUT_NINTENDO_SWITCH_JOYCON_R, - LAYOUT_DECK, - LAYOUT_PLAYSTATION, - LAYOUT_XBOX, - LAYOUT_GENERIC, There may still be errors in these, but they should be mostly correct. I'm leaving it up to Ethan to make it show the correct button glyphs for the correct controllers being connected (and possibly to fix these mappings where needed).
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
09365347b6
commit
e55e9efd9b
@@ -1,6 +1,7 @@
|
||||
#ifndef BUTTONGLYPHS_H
|
||||
#define BUTTONGLYPHS_H
|
||||
|
||||
#include <SDL.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "ActionSets.h"
|
||||
@@ -15,7 +16,14 @@ void BUTTONGLYPHS_init(void);
|
||||
bool BUTTONGLYPHS_keyboard_is_available(void);
|
||||
bool BUTTONGLYPHS_keyboard_is_active(void);
|
||||
const char* BUTTONGLYPHS_get_wasd_text(void);
|
||||
const char* BUTTONGLYPHS_get_button(ActionSet actionset, Action action);
|
||||
const char* BUTTONGLYPHS_get_button(ActionSet actionset, Action action, int binding);
|
||||
|
||||
char* BUTTONGLYPHS_get_all_gamepad_buttons(
|
||||
char* buffer,
|
||||
size_t buffer_len,
|
||||
ActionSet actionset,
|
||||
int action
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user