Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9c723da
WIP: Initial parts of Steam Input API support
RobertCochran Jan 28, 2026
6859ab8
Remove leftover debug include
RobertCochran Jan 29, 2026
0a13193
Don't require both X and Y movement to consider it a controller move
RobertCochran Jan 29, 2026
d6d88e9
Move to using keymaps instead of directly calling doaction
RobertCochran Jan 29, 2026
57e5cbd
Make the handle and keymap_id public members
RobertCochran Jan 30, 2026
c82ecbe
Deduplicate function
RobertCochran Jan 30, 2026
af30273
Initial glyph implementation
RobertCochran Feb 3, 2026
bf5482d
Add menu action set, do cursor/camera actions 'the right way'
RobertCochran Feb 5, 2026
36f75cb
Add 'real' interface to reset player pitch
RobertCochran Feb 7, 2026
645f108
Accept input from all connected controllers
RobertCochran Feb 7, 2026
86e0406
Be prepared to initialize SIAPI handles after boot
RobertCochran Feb 7, 2026
7a1034c
Fix default state of some handles
RobertCochran Feb 8, 2026
db87ec2
Add 'open controller configurator' button to controls settings
RobertCochran Feb 8, 2026
993a7ef
Add actions for every individual weapon
RobertCochran Feb 8, 2026
6488141
Add editing mode action set
RobertCochran Feb 8, 2026
26619b9
Move handle init check to after controller count check
RobertCochran Feb 8, 2026
9b13b63
Add SIAPI action for 'last weapon'
RobertCochran Feb 8, 2026
32c6e9e
Add gameplay window style and use to sense in vs out of game menus
RobertCochran Feb 11, 2026
cff5332
Factor out common textkey fetch code and also use in SIAPI code
RobertCochran Feb 14, 2026
ffbbac3
Add multiple origins support for SIAPI actions
RobertCochran Feb 14, 2026
2e7aa7f
Add joystick-like mode for pie menu cursor
RobertCochran Feb 14, 2026
dcb8364
Kill tabs in files that already existed
RobertCochran Feb 14, 2026
5d08d26
Format more like the Romans do
RobertCochran Feb 14, 2026
f152889
Add game/controller.o to CLIENT_OBJS
RobertCochran Feb 14, 2026
5d3c690
Fix missed formatting adjustment
RobertCochran Feb 14, 2026
dcf7932
Better return value for dummy get_siapi_textkeys
RobertCochran Feb 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions bin/amd64/game_actions_967460.vdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
"In Game Actions"
{
"actions"
{
"InGameControls"
{
"title" "#Set_Ingame"
"StickPadGyro"
{
"move"
{
"title" "#Action_Move"
"input_mode" "joystick_move"
}
"camera"
{
"title" "#Action_Camera"
"input_mode" "absolute_mouse"
}
}
"Button"
{
"primary" "#Action_Primary"
"secondary" "#Action_Secondary"
"reload" "#Action_Reload"
"use" "#Action_Use"
"jump" "#Action_Jump"
"walk" "#Action_Walk"
"crouch" "#Action_Crouch"
"special" "#Action_Special"
"drop" "#Action_Drop"
"affinity" "#Action_Affinity"
"dash" "#Action_Dash"

"next_weapon" "#Action_NextWeapon"
"previous_weapon" "#Action_PreviousWeapon"
"primary_weapon" "#Action_PrimaryWeapon"
"secondary_weapon" "#Action_SecondaryWeapon"
"wheel_select" "#Action_WheelSelect"
"change_loadout" "#Action_ChangeLoadout"

"scoreboard" "#Action_Scoreboard"
"suicide" "#Action_Suicide"

"recenter_camera" "#Action_RecenterCamera"

}
}
"MenuControls"
{
"title" "#Set_Menu"
"StickPadGyro"
{
}
"AnalogTrigger"
{
}
"Button"
{
"menu_up" "#Menu_Up"
"menu_down" "#Menu_Down"
"menu_left" "#Menu_Left"
"menu_right" "#Menu_Right"
"menu_select" "#Menu_Select"
"menu_cancel" "#Menu_Cancel"
"pause_menu" "#Action_ReturnToGame"
}
}
}
"localization"
{
"english"
{
"Set_Ingame" "In-Game Controls"
"Set_Menu" "Menu Controls"
"Action_Move" "Move"
"Action_Camera" "Camera"
"Action_Primary" "Primary Fire"
"Action_Secondary" "Secondary Fire"
"Action_Reload" "Reload"
"Action_Use" "Use"
"Action_Jump" "Jump"
"Action_Walk" "Walk"
"Action_Crouch" "Crouch"
"Action_Special" "Special"
"Action_Drop" "Drop"
"Action_Affinity" "Affinity"
"Action_Dash" "Dash"

"Action_RecenterCamera" "Recenter Camera"
"Menu_Up" "Up"
"Menu_Down" "Down"
"Menu_Left" "Left"
"Menu_Right" "Right"
"Menu_Select" "Select"
"Menu_Cancel" "Cancel"
}
}
}
6 changes: 6 additions & 0 deletions src/engine/cdpi.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Content Delivery Platform Integrations

#include "engine.h"
#include "controller.h"
#include <stddef.h>
#if defined(USE_STEAM)
#define HAS_STEAM 1
Expand Down Expand Up @@ -40,6 +41,7 @@ namespace cdpi
ISteamUserStats *stats = NULL;
ISteamClient *client = NULL, *sclient = NULL;
ISteamGameServer *serv = NULL;
ISteamInput *input = NULL;
HSteamPipe umpipe = 0, smpipe = 0;
HSteamUser uupipe = 0, supipe = 0;
HAuthTicket authticket = k_HAuthTicketInvalid;
Expand Down Expand Up @@ -184,6 +186,10 @@ namespace cdpi
if(!friends) { conoutf(colourred, "Failed to get Steam friends interface."); cleanup(SWCLIENT); return true; }
stats = (ISteamUserStats *)SteamAPI_ISteamClient_GetISteamUserStats(client, uupipe, umpipe, STEAMUSERSTATS_INTERFACE_VERSION);
if(!stats) { conoutf(colourred, "Failed to get Steam stats interface."); cleanup(SWCLIENT); return true; }
input = (ISteamInput *)SteamAPI_ISteamClient_GetISteamInput(client, uupipe, umpipe, STEAMINPUT_INTERFACE_VERSION);
if (!input) { conoutf(colourred, "Failed to get Steam Input interface."); cleanup(SWCLIENT); return true; }
input->Init(false);
controller::init_action_handles();

const char *name = SteamAPI_ISteamFriends_GetPersonaName(friends);
if(name && *name)
Expand Down
6 changes: 6 additions & 0 deletions src/engine/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include "version.h"
#include "cube.h"
#if defined(USE_STEAM)
#include "steam_api_flat.h"
#endif

#define LOG_FILE "log.txt"

Expand Down Expand Up @@ -49,6 +52,9 @@ namespace cdpi
namespace steam
{
extern char *steamusername, *steamuserid, *steamserverid;
#if defined(USE_STEAM)
extern ISteamInput *input;
#endif

extern bool clientready();
extern bool clientauthticket(char *token, uint *tokenlen, ENetAddress *addr = NULL);
Expand Down
3 changes: 3 additions & 0 deletions src/engine/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// main.cpp: initialisation & main loop

#include "engine.h"
#include "controller.h"
#include <signal.h>
#include <stdio.h>

#ifdef SDL_VIDEO_DRIVER_X11
#include "SDL_syswm.h"
Expand Down Expand Up @@ -824,6 +826,7 @@ void checkinput()
warping = false;
if(grabinput && shouldwarp) resetcursor(true, false);
}
controller::update_from_controller();
}

void swapbuffers(bool overlay)
Expand Down
Loading