.custom_shaders = 1
});
+ if( proj->env->platform == k_platform_windows )
+ {
+ vg_link( proj, "-lws2_32 " );
+ }
+
vg_add_source( proj, "skaterift.c " );
vg_add_controller_database( proj );
vg_compile_project( proj );
#include "ent_region.h"
#include "vg/vg_loader.h"
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netdb.h>
+#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+#else
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <netdb.h>
+#endif
struct network_client network_client =
{
&hints, &result);
if( s != 0 )
{
+#ifndef _WIN32
vg_error( "getaddrinfo: %s\n", gai_strerror(s) );
+#endif
+
+ if( !strcmp( network_client.host_adress, "skaterift.com" ) )
+ {
+ vg_warn( "getaddrinfo failed for skaterift.com;\n "
+ "falling back to a hardcoded IPv4\n" );
+ strcpy( network_client.host_adress, "46.101.34.155" );
+ SteamAPI_SteamNetworkingIPAddr_ParseString(
+ &network_client.ip,
+ network_client.host_adress );
+ network_client.ip.m_port = NETWORK_PORT;
+ *status = 1;
+ }
+
goto end;
}