X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=steam.h;h=52b7a4fe6f8c9d9c9ddd8647a5c9567fc2354b9f;hb=b3ca3b7a45eec11c46eb19772e10021177665adb;hp=969f632aadeb0500de27fe474f72ee63efb03794;hpb=c34dde859968ced3dc7e8dd7be29f676689813d3;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/steam.h b/steam.h index 969f632..52b7a4f 100644 --- a/steam.h +++ b/steam.h @@ -16,16 +16,6 @@ #include "vg/vg_steam_user_stats.h" #include "submodules/anyascii/impl/c/anyascii.c" -enum steam_controller_type{ - k_steam_controller_type_keyboard, - k_steam_controller_type_xbox, - k_steam_controller_type_playstation, - k_steam_controller_type_steam, - k_steam_controller_type_steam_deck -}; - -VG_STATIC enum steam_controller_type steam_display_controller; - /* * We only want to use steamworks if building for the networked version, * theres not much point otherwise. We mainly want steamworks for setting @@ -171,8 +161,6 @@ VG_STATIC void steam_on_recieve_current_stats( CallbackMsg_t *msg ) } } -VG_STATIC ISteamInput *steam_hInput; - VG_STATIC u32 utf8_byte0_byte_count( u8 char0 ) { for( u32 k=2; k<4; k++ ){ @@ -272,10 +260,6 @@ VG_STATIC int steam_init(void) vg_console_reg_cmd( "ach_clear_all", steam_clear_all_achievements, NULL ); vg_console_reg_cmd( "ach_set", steam_set_achievemnt_test, NULL ); - steam_hInput = SteamAPI_SteamInput(); - SteamAPI_ISteamInput_Init( steam_hInput, 0 ); - SteamAPI_ISteamInput_RunFrame( steam_hInput, 0 ); - #endif /* TODO: On username update callback */ @@ -289,47 +273,6 @@ VG_STATIC void steam_update(void) { if( steam_ready ){ steamworks_event_loop( hSteamClientPipe ); - - /* TODO - * We can probably request this from SDL too - */ - if( steam_hInput ){ - SteamAPI_ISteamInput_RunFrame( steam_hInput, 0 ); - - InputHandle_t joy0 = SteamAPI_ISteamInput_GetControllerForGamepadIndex( - steam_hInput, 0 ); - - vg_input.controller_should_use_trackpad_look = 0; - if( joy0 != 0 ){ - ESteamInputType type = SteamAPI_ISteamInput_GetInputTypeForHandle( - steam_hInput, joy0 ); - - if( type == k_ESteamInputType_SteamController ){ - vg_input.controller_should_use_trackpad_look = 1; - steam_display_controller = k_steam_controller_type_steam; - } - else if( type == k_ESteamInputType_SteamDeckController ){ - steam_display_controller = k_steam_controller_type_steam_deck; - } - else if( type == k_ESteamInputType_PS3Controller || - type == k_ESteamInputType_PS4Controller || - type == k_ESteamInputType_PS5Controller ) - { - steam_display_controller = k_steam_controller_type_playstation; - } - else if( type == k_ESteamInputType_XBox360Controller || - type == k_ESteamInputType_XBoxOneController ) - { - steam_display_controller = k_steam_controller_type_xbox; - } - else{ - /* currently unsupported controller */ - steam_display_controller = k_steam_controller_type_xbox; - } - } - else - steam_display_controller = k_steam_controller_type_keyboard; - } } }