Revert "Add UI to configure keyboard-to-controller mapping (#308)"

This reverts commit fdb13a3b90.
This commit is contained in:
georgemoralis 2024-09-11 12:56:27 +03:00
parent c27d79c2e7
commit dd61c2a0d1
18 changed files with 173 additions and 1436 deletions

View file

@ -3,10 +3,8 @@
#pragma once
#include <map>
#include <string>
#include "common/types.h"
#include "input/keys_constants.h"
struct SDL_Window;
struct SDL_Gamepad;
@ -14,8 +12,7 @@ union SDL_Event;
namespace Input {
class GameController;
enum class Axis;
} // namespace Input
}
namespace Frontend {
@ -71,8 +68,6 @@ public:
void waitEvent();
void setKeysBindingsMap(const std::map<u32, KeysMapping>& bindingsMap);
private:
void onResize();
void onKeyPress(const SDL_Event* event);
@ -80,34 +75,12 @@ private:
int sdlGamepadToOrbisButton(u8 button);
void handleR2Key(const SDL_Event* event, u32& button, Input::Axis& axis, int& axisvalue,
int& ax);
void handleL2Key(const SDL_Event* event, u32& button, Input::Axis& axis, int& axisvalue,
int& ax);
void handleLAnalogRightKey(const SDL_Event* event, u32& button, Input::Axis& axis,
int& axisvalue, int& ax);
void handleLAnalogLeftKey(const SDL_Event* event, u32& button, Input::Axis& axis,
int& axisvalue, int& ax);
void handleLAnalogUpKey(const SDL_Event* event, u32& button, Input::Axis& axis, int& axisvalue,
int& ax);
void handleLAnalogDownKey(const SDL_Event* event, u32& button, Input::Axis& axis,
int& axisvalue, int& ax);
void handleRAnalogRightKey(const SDL_Event* event, u32& button, Input::Axis& axis,
int& axisvalue, int& ax);
void handleRAnalogLeftKey(const SDL_Event* event, u32& button, Input::Axis& axis,
int& axisvalue, int& ax);
void handleRAnalogUpKey(const SDL_Event* event, u32& button, Input::Axis& axis, int& axisvalue,
int& ax);
void handleRAnalogDownKey(const SDL_Event* event, u32& button, Input::Axis& axis,
int& axisvalue, int& ax);
private:
s32 width;
s32 height;
Input::GameController* controller;
WindowSystemInfo window_info{};
SDL_Window* window{};
std::map<u32, KeysMapping> keysBindingsMap;
bool is_shown{};
bool is_open{true};
};