Wii/GameCube: Some small improvements in input

GameCube: Increase deadzone range (thanks GK6475)
Wii: Changed classic controller mapping (thanks SuperMYL)

Also in general, start adding separate input buttons for gamepad buttons
This commit is contained in:
UnknownShadow200 2023-08-01 17:28:24 +10:00
parent 3b2ffa010c
commit 48211f9b47
11 changed files with 118 additions and 74 deletions

View File

@ -479,8 +479,11 @@
<ClCompile Include="Deflate.c" />
<ClCompile Include="Model.c" />
<ClCompile Include="Menus.c" />
<ClCompile Include="Platform_3DS.c" />
<ClCompile Include="Platform_Android.c" />
<ClCompile Include="Platform_GCWii.c" />
<ClCompile Include="Platform_Posix.c" />
<ClCompile Include="Platform_PSP.c" />
<ClCompile Include="Platform_Web.c" />
<ClCompile Include="Platform_WinApi.c" />
<ClCompile Include="Protocol.c" />
@ -511,8 +514,11 @@
<ClCompile Include="Vorbis.c" />
<ClCompile Include="Widgets.c" />
<ClCompile Include="Logger.c" />
<ClCompile Include="Window_3DS.c" />
<ClCompile Include="Window_Android.c" />
<ClCompile Include="Window_Carbon.c" />
<ClCompile Include="Window_GCWii.c" />
<ClCompile Include="Window_PSP.c" />
<ClCompile Include="Window_SDL.c" />
<ClCompile Include="Window_Web.c" />
<ClCompile Include="Window_Win.c" />

View File

@ -542,9 +542,6 @@
<ClCompile Include="Animations.c">
<Filter>Source Files\TexturePack</Filter>
</ClCompile>
<ClCompile Include="Platform_WinApi.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Platform_Web.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
@ -602,6 +599,27 @@
<ClCompile Include="SSL.c">
<Filter>Source Files\Network</Filter>
</ClCompile>
<ClCompile Include="Platform_PSP.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Platform_GCWii.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Platform_3DS.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Window_3DS.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Window_GCWii.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Window_PSP.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
<ClCompile Include="Platform_WinApi.c">
<Filter>Source Files\Platform</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\misc\CCicon.rc">

View File

@ -189,6 +189,9 @@ cc_bool Input_Pressed[INPUT_COUNT];
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",\
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",\
"U", "V", "W", "X", "Y", "Z"
#define Pad_Names \
"PAD_A", "PAD_B", "PAD_X", "PAD_Y", "PAD_L", "PAD_R", \
"PAD_LEFT", "PAD_RIGHT", "PAD_UP", "PAD_DOWN",
const char* const Input_StorageNames[INPUT_COUNT] = {
"None",
@ -209,7 +212,8 @@ const char* const Input_StorageNames[INPUT_COUNT] = {
"Keypad5", "Keypad6", "Keypad7", "Keypad8", "Keypad9",
"KeypadDivide", "KeypadMultiply", "KeypadSubtract",
"KeypadAdd", "KeypadDecimal", "KeypadEnter",
"XButton1", "XButton2", "LeftMouse", "RightMouse", "MiddleMouse"
"XButton1", "XButton2", "LeftMouse", "RightMouse", "MiddleMouse",
Pad_Names
};
const char* const Input_DisplayNames[INPUT_COUNT] = {
@ -232,6 +236,7 @@ const char* const Input_DisplayNames[INPUT_COUNT] = {
"DIVIDE", "MULTIPLY", "SUBTRACT",
"ADD", "DECIMAL", "NUMPADENTER",
"XBUTTON1", "XBUTTON2", "LMOUSE", "RMOUSE", "MMOUSE"
Pad_Names
};
void Input_SetPressed(int key) {
@ -833,9 +838,9 @@ static cc_bool InputHandler_IsShutdown(int key) {
static void InputHandler_Toggle(int key, cc_bool* target, const char* enableMsg, const char* disableMsg) {
*target = !(*target);
if (*target) {
Chat_Add2("%c. &ePress &a%c &eto disable.", enableMsg, Input_StorageNames[key]);
Chat_Add2("%c. &ePress &a%c &eto disable.", enableMsg, Input_DisplayNames[key]);
} else {
Chat_Add2("%c. &ePress &a%c &eto re-enable.", disableMsg, Input_StorageNames[key]);
Chat_Add2("%c. &ePress &a%c &eto re-enable.", disableMsg, Input_DisplayNames[key]);
}
}

View File

@ -45,6 +45,9 @@ enum InputButtons {
/* NOTE: RMOUSE must be before MMOUSE for PlayerClick compatibility */
CCMOUSE_X1, CCMOUSE_X2, CCMOUSE_L, CCMOUSE_R, CCMOUSE_M,
CCPAD_A, CCPAD_B, CCPAD_X, CCPAD_Y, CCPAD_L, CCPAD_R,
CCPAD_LEFT, CCPAD_RIGHT, CCPAD_UP, CCPAD_DOWN,
INPUT_COUNT,
INPUT_CLIPBOARD_COPY = 1001,
@ -61,6 +64,11 @@ extern const char* const Input_DisplayNames[INPUT_COUNT];
#define Input_IsCtrlPressed() (Input_Pressed[CCKEY_LCTRL] || Input_Pressed[CCKEY_RCTRL])
#define Input_IsShiftPressed() (Input_Pressed[CCKEY_LSHIFT] || Input_Pressed[CCKEY_RSHIFT])
#define Input_IsUpButton(btn) ((btn) == CCKEY_UP || (btn) == CCPAD_UP)
#define Input_IsDownButton(btn) ((btn) == CCKEY_DOWN || (btn) == CCPAD_DOWN)
#define Input_IsLeftButton(btn) ((btn) == CCKEY_LEFT || (btn) == CCPAD_LEFT)
#define Input_IsRightButton(btn) ((btn) == CCKEY_RIGHT || (btn) == CCPAD_RIGHT)
#if defined CC_BUILD_HAIKU
/* Haiku uses ALT instead of CTRL for clipboard and stuff */
#define Input_IsActionPressed() Input_IsAltPressed()

View File

@ -102,9 +102,9 @@ static void LScreen_KeyDown(struct LScreen* s, int key, cc_bool was) {
if (key == CCKEY_TAB) {
LScreen_CycleSelected(s, Input_IsShiftPressed() ? -1 : 1);
} else if (key == CCKEY_UP) {
} else if (Input_IsUpButton(key)) {
LScreen_CycleSelected(s, -1);
} else if (key == CCKEY_DOWN) {
} else if (Input_IsDownButton(key)) {
LScreen_CycleSelected(s, 1);
} else if (key == CCKEY_ESCAPE && s->onEscapeWidget) {
s->onEscapeWidget->OnClick(s->onEscapeWidget);
@ -379,13 +379,13 @@ static void ColoursScreen_MouseWheel(struct LScreen* s_, float delta) {
}
static void ColoursScreen_KeyDown(struct LScreen* s, int key, cc_bool was) {
if (key == CCKEY_LEFT) {
if (Input_IsLeftButton(key)) {
ColoursScreen_AdjustSelected(s, -1);
} else if (key == CCKEY_RIGHT) {
} else if (Input_IsRightButton(key)) {
ColoursScreen_AdjustSelected(s, +1);
} else if (key == CCKEY_UP) {
} else if (Input_IsUpButton(key)) {
ColoursScreen_AdjustSelected(s, +10);
} else if (key == CCKEY_DOWN) {
} else if (Input_IsDownButton(key)) {
ColoursScreen_AdjustSelected(s, -10);
} else {
LScreen_KeyDown(s, key, was);

View File

@ -259,9 +259,9 @@ static cc_bool LInput_KeyDown(void* widget, int key, cc_bool was) {
LInput_CopyFromClipboard(w);
} else if (key == CCKEY_ESCAPE) {
if (w->text.length) LInput_SetString(w, &String_Empty);
} else if (key == CCKEY_LEFT) {
} else if (Input_IsLeftButton(key)) {
LInput_AdvanceCaretPos(w, false);
} else if (key == CCKEY_RIGHT) {
} else if (Input_IsRightButton(key)) {
LInput_AdvanceCaretPos(w, true);
} else { return false; }
@ -563,16 +563,17 @@ void LTable_RowClick(struct LTable* w, int row) {
}
cc_bool LTable_HandlesKey(int key) {
return key == CCKEY_UP || key == CCKEY_DOWN || key == CCKEY_PAGEUP || key == CCKEY_PAGEDOWN;
return Input_IsUpButton(key) || key == CCKEY_PAGEUP ||
Input_IsDownButton(key) || key == CCKEY_PAGEDOWN;
}
static cc_bool LTable_KeyDown(void* widget, int key, cc_bool was) {
struct LTable* w = (struct LTable*)widget;
int index = LTable_GetSelectedIndex(w);
if (key == CCKEY_UP) {
if (Input_IsUpButton(key)) {
index--;
} else if (key == CCKEY_DOWN) {
} else if (Input_IsDownButton(key)) {
index++;
} else if (key == CCKEY_PAGEUP) {
index -= w->visibleRows;

View File

@ -310,9 +310,9 @@ static void ListScreen_Select(struct ListScreen* s, const cc_string* str) {
static int ListScreen_KeyDown(void* screen, int key) {
struct ListScreen* s = (struct ListScreen*)screen;
if (key == CCKEY_LEFT || key == CCKEY_PAGEUP) {
if (Input_IsLeftButton(key) || key == CCKEY_PAGEUP) {
ListScreen_PageClick(s, false);
} else if (key == CCKEY_RIGHT || key == CCKEY_PAGEDOWN) {
} else if (Input_IsRightButton(key) || key == CCKEY_PAGEDOWN) {
ListScreen_PageClick(s, true);
}
return true;

View File

@ -931,13 +931,13 @@ static int TableWidget_KeyDown(void* widget, int key) {
struct TableWidget* w = (struct TableWidget*)widget;
if (w->selectedIndex == -1) return false;
if (key == CCKEY_LEFT || key == CCKEY_KP4) {
if (Input_IsLeftButton(key) || key == CCKEY_KP4) {
TableWidget_ScrollRelative(w, -1);
} else if (key == CCKEY_RIGHT || key == CCKEY_KP6) {
} else if (Input_IsRightButton(key) || key == CCKEY_KP6) {
TableWidget_ScrollRelative(w, 1);
} else if (key == CCKEY_UP || key == CCKEY_KP8) {
} else if (Input_IsUpButton(key) || key == CCKEY_KP8) {
TableWidget_ScrollRelative(w, -w->blocksPerRow);
} else if (key == CCKEY_DOWN || key == CCKEY_KP2) {
} else if (Input_IsDownButton(key) || key == CCKEY_KP2) {
TableWidget_ScrollRelative(w, w->blocksPerRow);
} else {
return false;
@ -1332,9 +1332,9 @@ static void InputWidget_Reposition(void* widget) {
static int InputWidget_KeyDown(void* widget, int key) {
struct InputWidget* w = (struct InputWidget*)widget;
if (key == CCKEY_LEFT) {
if (Input_IsLeftButton(key)) {
InputWidget_LeftKey(w);
} else if (key == CCKEY_RIGHT) {
} else if (Input_IsRightButton(key)) {
InputWidget_RightKey(w);
} else if (key == CCKEY_BACKSPACE) {
InputWidget_BackspaceKey(w);
@ -1888,9 +1888,13 @@ static void ChatInputWidget_TabKey(struct InputWidget* w) {
static int ChatInputWidget_KeyDown(void* widget, int key) {
struct InputWidget* w = (struct InputWidget*)widget;
if (key == CCKEY_TAB) { ChatInputWidget_TabKey(w); return true; }
if (key == CCKEY_UP) { ChatInputWidget_UpKey(w); return true; }
if (key == CCKEY_DOWN) { ChatInputWidget_DownKey(w); return true; }
if (key == CCKEY_TAB) {
ChatInputWidget_TabKey(w); return true;
} else if (Input_IsUpButton(key)) {
ChatInputWidget_UpKey(w); return true;
} else if (Input_IsDownButton(key)) {
ChatInputWidget_DownKey(w); return true;
}
return InputWidget_KeyDown(w, key);
}

View File

@ -69,21 +69,21 @@ static void HandleButtons_Game(u32 mods) {
Input_SetNonRepeatable(KeyBinds[KEYBIND_DELETE_BLOCK], mods & KEY_R);
Input_SetNonRepeatable(KeyBinds[KEYBIND_JUMP], mods & KEY_A);
Input_SetNonRepeatable(KeyBinds[KEYBIND_CHAT], mods & KEY_X);
Input_SetNonRepeatable(KeyBinds[KEYBIND_INVENTORY], mods & KEY_Y);
Input_SetNonRepeatable(KeyBinds[KEYBIND_INVENTORY], mods & KEY_X);
Input_SetNonRepeatable(KeyBinds[KEYBIND_CHAT], mods & KEY_Y);
Input_SetNonRepeatable(CCKEY_ENTER, mods & KEY_START);
Input_SetNonRepeatable(CCKEY_ESCAPE, mods & KEY_SELECT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_LEFT], mods & KEY_DLEFT);
Input_SetNonRepeatable(CCKEY_LEFT, mods & KEY_DLEFT);
Input_SetNonRepeatable(CCPAD_LEFT, mods & KEY_DLEFT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_RIGHT], mods & KEY_DRIGHT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & KEY_DRIGHT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & KEY_DRIGHT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_FORWARD], mods & KEY_DUP);
Input_SetNonRepeatable(CCKEY_UP, mods & KEY_DUP);
Input_SetNonRepeatable(CCPAD_UP, mods & KEY_DUP);
Input_SetNonRepeatable(KeyBinds[KEYBIND_BACK], mods & KEY_DDOWN);
Input_SetNonRepeatable(CCKEY_DOWN, mods & KEY_DDOWN);
Input_SetNonRepeatable(CCPAD_DOWN, mods & KEY_DDOWN);
}
static void HandleButtons_Launcher(u32 mods) {
@ -92,10 +92,10 @@ static void HandleButtons_Launcher(u32 mods) {
// fake tab with down for Launcher
//Input_SetNonRepeatable(CCKEY_TAB, mods & KEY_DDOWN);
Input_SetNonRepeatable(CCKEY_LEFT, mods & KEY_DLEFT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & KEY_DRIGHT);
Input_SetNonRepeatable(CCKEY_UP, mods & KEY_DUP);
Input_SetNonRepeatable(CCKEY_DOWN, mods & KEY_DDOWN);
Input_SetNonRepeatable(CCPAD_LEFT, mods & KEY_DLEFT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & KEY_DRIGHT);
Input_SetNonRepeatable(CCPAD_UP, mods & KEY_DUP);
Input_SetNonRepeatable(CCPAD_DOWN, mods & KEY_DDOWN);
}
static void ProcessJoystickInput(circlePosition* pos) {
// May not be exactly 0 on actual hardware

View File

@ -90,10 +90,10 @@ static void ProcessPAD_Launcher(PADStatus* pad) {
// fake tab with down for Launcher
//Input_SetNonRepeatable(CCKEY_TAB, mods & PAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCKEY_LEFT, mods & PAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & PAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCKEY_UP, mods & PAD_BUTTON_UP);
Input_SetNonRepeatable(CCKEY_DOWN, mods & PAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCPAD_LEFT, mods & PAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & PAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCPAD_UP, mods & PAD_BUTTON_UP);
Input_SetNonRepeatable(CCPAD_DOWN, mods & PAD_BUTTON_DOWN);
}
static void ProcessPAD_Game(PADStatus* pad) {
@ -103,8 +103,8 @@ static void ProcessPAD_Game(PADStatus* pad) {
if (Input_RawMode) {
// May not be exactly 0 on actual hardware
if (Math_AbsI(dx) <= 4) dx = 0;
if (Math_AbsI(dy) <= 4) dy = 0;
if (Math_AbsI(dx) <= 8) dx = 0;
if (Math_AbsI(dy) <= 8) dy = 0;
Event_RaiseRawMove(&PointerEvents.RawMoved, dx / 8.0f, -dy / 8.0f);
}
@ -113,22 +113,22 @@ static void ProcessPAD_Game(PADStatus* pad) {
Input_SetNonRepeatable(KeyBinds[KEYBIND_DELETE_BLOCK], mods & PAD_TRIGGER_R);
Input_SetNonRepeatable(KeyBinds[KEYBIND_JUMP], mods & PAD_BUTTON_A);
Input_SetNonRepeatable(KeyBinds[KEYBIND_CHAT], mods & PAD_BUTTON_X);
Input_SetNonRepeatable(KeyBinds[KEYBIND_INVENTORY], mods & PAD_BUTTON_Y);
Input_SetNonRepeatable(KeyBinds[KEYBIND_INVENTORY], mods & PAD_BUTTON_X);
Input_SetNonRepeatable(KeyBinds[KEYBIND_CHAT], mods & PAD_BUTTON_Y);
// TODO PAD_BUTTON_B
Input_SetNonRepeatable(CCKEY_ENTER, mods & PAD_BUTTON_START);
Input_SetNonRepeatable(CCKEY_ESCAPE, mods & PAD_TRIGGER_Z);
Input_SetNonRepeatable(KeyBinds[KEYBIND_LEFT], mods & PAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCKEY_LEFT, mods & PAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCPAD_LEFT, mods & PAD_BUTTON_LEFT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_RIGHT], mods & PAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & PAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & PAD_BUTTON_RIGHT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_FORWARD], mods & PAD_BUTTON_UP);
Input_SetNonRepeatable(CCKEY_UP, mods & PAD_BUTTON_UP);
Input_SetNonRepeatable(CCPAD_UP, mods & PAD_BUTTON_UP);
Input_SetNonRepeatable(KeyBinds[KEYBIND_BACK], mods & PAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCKEY_DOWN, mods & PAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCPAD_DOWN, mods & PAD_BUTTON_DOWN);
}
static void ProcessPADInput(void) {
@ -156,10 +156,10 @@ static void ProcessWPAD_Launcher(int mods) {
Input_SetNonRepeatable(CCKEY_ENTER, mods & WPAD_BUTTON_A);
Input_SetNonRepeatable(CCKEY_ESCAPE, mods & WPAD_BUTTON_B);
Input_SetNonRepeatable(CCKEY_LEFT, mods & WPAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & WPAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCKEY_UP, mods & WPAD_BUTTON_UP);
Input_SetNonRepeatable(CCKEY_DOWN, mods & WPAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCPAD_LEFT, mods & WPAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & WPAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCPAD_UP, mods & WPAD_BUTTON_UP);
Input_SetNonRepeatable(CCPAD_DOWN, mods & WPAD_BUTTON_DOWN);
}
static void ProcessWPAD_Game(int mods) {
@ -174,14 +174,14 @@ static void ProcessWPAD_Game(int mods) {
Input_SetNonRepeatable(CCKEY_ESCAPE, mods & WPAD_BUTTON_MINUS);
Input_SetNonRepeatable(KeyBinds[KEYBIND_LEFT], mods & WPAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCKEY_LEFT, mods & WPAD_BUTTON_LEFT);
Input_SetNonRepeatable(CCPAD_LEFT, mods & WPAD_BUTTON_LEFT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_RIGHT], mods & WPAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & WPAD_BUTTON_RIGHT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & WPAD_BUTTON_RIGHT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_FORWARD], mods & WPAD_BUTTON_UP);
Input_SetNonRepeatable(CCKEY_UP, mods & WPAD_BUTTON_UP);
Input_SetNonRepeatable(CCPAD_UP, mods & WPAD_BUTTON_UP);
Input_SetNonRepeatable(KeyBinds[KEYBIND_BACK], mods & WPAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCKEY_DOWN, mods & WPAD_BUTTON_DOWN);
Input_SetNonRepeatable(CCPAD_DOWN, mods & WPAD_BUTTON_DOWN);
}
static void ProcessNunchuck_Game(int mods, double delta) {
@ -214,15 +214,16 @@ static void ProcessNunchuck_Game(int mods, double delta) {
bool nunchuckRight = (analog.ang > 90-ANGLE_DELTA) && (analog.ang < 90+ANGLE_DELTA) && (analog.mag > 0.5);
Input_SetNonRepeatable(KeyBinds[KEYBIND_LEFT], nunchuckLeft);
Input_SetNonRepeatable(CCKEY_LEFT, nunchuckLeft);
Input_SetNonRepeatable(CCPAD_LEFT, nunchuckLeft);
Input_SetNonRepeatable(KeyBinds[KEYBIND_RIGHT], nunchuckRight);
Input_SetNonRepeatable(CCKEY_RIGHT, nunchuckRight);
Input_SetNonRepeatable(CCPAD_RIGHT, nunchuckRight);
Input_SetNonRepeatable(KeyBinds[KEYBIND_FORWARD], nunchuckUp);
Input_SetNonRepeatable(CCKEY_UP, nunchuckUp);
Input_SetNonRepeatable(CCPAD_UP, nunchuckUp);
Input_SetNonRepeatable(KeyBinds[KEYBIND_BACK], nunchuckDown);
Input_SetNonRepeatable(CCKEY_DOWN, nunchuckDown);
Input_SetNonRepeatable(CCPAD_DOWN, nunchuckDown);
}
static void ProcessClassic_Joystick(struct joystick_t* js) {
// TODO: need to account for min/max??
int dx = js->pos.x - js->center.x;
@ -239,25 +240,26 @@ static void ProcessClassic_Game(void) {
classic_ctrl_t ctrls = wd->exp.classic;
int mods = ctrls.btns | ctrls.btns_held;
Input_SetNonRepeatable(KeyBinds[KEYBIND_PLACE_BLOCK], mods & CLASSIC_CTRL_BUTTON_X);
Input_SetNonRepeatable(KeyBinds[KEYBIND_DELETE_BLOCK], mods & CLASSIC_CTRL_BUTTON_Y);
Input_SetNonRepeatable(KeyBinds[KEYBIND_PLACE_BLOCK], mods & CLASSIC_CTRL_BUTTON_FULL_L);
Input_SetNonRepeatable(KeyBinds[KEYBIND_DELETE_BLOCK], mods & CLASSIC_CTRL_BUTTON_FULL_R);
Input_SetNonRepeatable(KeyBinds[KEYBIND_JUMP], mods & CLASSIC_CTRL_BUTTON_A);
Input_SetNonRepeatable(KeyBinds[KEYBIND_INVENTORY], mods & CLASSIC_CTRL_BUTTON_PLUS);
Input_SetNonRepeatable(KeyBinds[KEYBIND_INVENTORY], mods & CLASSIC_CTRL_BUTTON_X);
Input_SetNonRepeatable(KeyBinds[KEYBIND_CHAT], mods & CLASSIC_CTRL_BUTTON_Y);
// TODO: CLASSIC_CTRL_BUTTON_B
Input_SetNonRepeatable(CCKEY_ENTER, mods & CLASSIC_CTRL_BUTTON_HOME);
Input_SetNonRepeatable(CCKEY_ENTER, mods & CLASSIC_CTRL_BUTTON_PLUS);
Input_SetNonRepeatable(CCKEY_ESCAPE, mods & CLASSIC_CTRL_BUTTON_MINUS);
Input_SetNonRepeatable(KeyBinds[KEYBIND_LEFT], mods & CLASSIC_CTRL_BUTTON_LEFT);
Input_SetNonRepeatable(CCKEY_LEFT, mods & CLASSIC_CTRL_BUTTON_LEFT);
Input_SetNonRepeatable(CCPAD_LEFT, mods & CLASSIC_CTRL_BUTTON_LEFT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_RIGHT], mods & CLASSIC_CTRL_BUTTON_RIGHT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & CLASSIC_CTRL_BUTTON_RIGHT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & CLASSIC_CTRL_BUTTON_RIGHT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_FORWARD], mods & CLASSIC_CTRL_BUTTON_UP);
Input_SetNonRepeatable(CCKEY_UP, mods & CLASSIC_CTRL_BUTTON_UP);
Input_SetNonRepeatable(CCPAD_UP, mods & CLASSIC_CTRL_BUTTON_UP);
Input_SetNonRepeatable(KeyBinds[KEYBIND_BACK], mods & CLASSIC_CTRL_BUTTON_DOWN);
Input_SetNonRepeatable(CCKEY_DOWN, mods & CLASSIC_CTRL_BUTTON_DOWN);
Input_SetNonRepeatable(CCPAD_DOWN, mods & CLASSIC_CTRL_BUTTON_DOWN);
if (Input_RawMode) {
ProcessClassic_Joystick(&ctrls.ljs);

View File

@ -80,14 +80,14 @@ void Window_ProcessEvents(double delta) {
Input_SetNonRepeatable(CCKEY_TAB, mods & PSP_CTRL_SQUARE);
Input_SetNonRepeatable(KeyBinds[KEYBIND_LEFT], mods & PSP_CTRL_LEFT);
Input_SetNonRepeatable(CCKEY_LEFT, mods & PSP_CTRL_LEFT);
Input_SetNonRepeatable(CCPAD_LEFT, mods & PSP_CTRL_LEFT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_RIGHT], mods & PSP_CTRL_RIGHT);
Input_SetNonRepeatable(CCKEY_RIGHT, mods & PSP_CTRL_RIGHT);
Input_SetNonRepeatable(CCPAD_RIGHT, mods & PSP_CTRL_RIGHT);
Input_SetNonRepeatable(KeyBinds[KEYBIND_FORWARD], mods & PSP_CTRL_UP);
Input_SetNonRepeatable(CCKEY_UP, mods & PSP_CTRL_UP);
Input_SetNonRepeatable(CCPAD_UP, mods & PSP_CTRL_UP);
Input_SetNonRepeatable(KeyBinds[KEYBIND_BACK], mods & PSP_CTRL_DOWN);
Input_SetNonRepeatable(CCKEY_DOWN, mods & PSP_CTRL_DOWN);
Input_SetNonRepeatable(CCPAD_DOWN, mods & PSP_CTRL_DOWN);
}
static void Cursor_GetRawPos(int* x, int* y) {