static GLuint sw_get_player_image( u64_steamid usr )
{
+#ifdef VG_STEAM
+
// Look for player in cache
for( int i = 0; i < steam_api_classes.cache_count; i ++ )
{
free( img_buf );
return dest->avatar_texture;
+
+#else
+ return 0;
+#endif
}
ISteamFriends *SteamAPI_SteamFriends_v017();
static void sw_exit(void)
{
+#ifdef VG_STEAM
SteamAPI_Shutdown();
+#endif
}
-// Needs to be manually called by client unfortunately
static void sw_free_opengl(void)
{
for( int i = 0; i < steam_api_classes.cache_count; i ++ )
static int sw_init(void)
{
+#ifdef VG_STEAM
#if defined(VALVE_CALLBACK_PACK_SMALL)
if( sizeof(ValvePackingSentinel_t) != 24 ){
printf( "Struct packing error: ValvePackingSentinel_t expected 24 got %i\nThe application is built incorrectly\n", (int)sizeof(ValvePackingSentinel_t));
vg_register_exit( &sw_exit, "SteamAPI" );
return 1;
+#else
+ return 1;
+#endif
}
static void sw_event_loop(void)
{
+#ifdef VG_STEAM
SteamAPI_ManualDispatch_RunFrame( steam_api_classes.pipe );
CallbackMsg_t callback;
SteamAPI_ManualDispatch_FreeLastCallback( steam_api_classes.pipe );
}
+#endif
}
static void sw_set_achievement( const char *vg_ach_name )
if( !ach->is_set )
{
+#ifdef VG_STEAM
SteamAPI_ISteamUserStats_SetAchievement( steam_api_classes.stats, vg_ach_name );
+#endif
ach->is_set = 1;
vg_success( "Achievement set: '%s'\n", vg_ach_name );
}