4 #include "vg/vg_steam.h"
5 #include "vg/vg_steam_networking.h"
6 #include "vg/vg_steam_auth.h"
7 #include "vg/vg_steam_http.h"
10 * We only want to use steamworks if building for the networked version,
11 * theres not much point otherwise. We mainly want steamworks for setting
12 * achievements etc.. so that includes our own server too.
14 * This file also wraps the functions and interfaces that we want to use to
15 * make them a bit easier to read, since they are the flat API they have very
16 * long names. in non-networked builds they will return default errors or do
20 static int steam_ready
= 0;
21 static void *hSteamNetworkingSockets
,
24 static HSteamPipe hSteamClientPipe
;
26 static void steam_init(void)
29 if( !SteamAPI_Init() )
31 vg_error( "Steamworks failed to initialize\n" );
36 SteamAPI_ManualDispatch_Init();
37 vg_success( "Steamworks API running\n" );
39 /* Connect interfaces */
40 hSteamClientPipe
= SteamAPI_GetHSteamPipe();
41 hSteamNetworkingSockets
= SteamAPI_SteamNetworkingSockets_SteamAPI();
42 hSteamUser
= SteamAPI_SteamUser();
46 static void steam_update(void)
49 steamworks_event_loop( hSteamClientPipe
);
52 static void steam_end(void)
56 vg_info( "Shutting down\n..." );