From 6ba4e274e20392073509fa7e0fd26475f630c643 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Tue, 9 Mar 2021 18:59:24 +0100 Subject: [PATCH] Allow offline play This fixes #19 --- src/client/component/demonware.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client/component/demonware.cpp b/src/client/component/demonware.cpp index 6f66e26..5e8bb16 100644 --- a/src/client/component/demonware.cpp +++ b/src/client/component/demonware.cpp @@ -327,6 +327,12 @@ namespace demonware return ioctlsocket(s, cmd, argp); } + + BOOL internet_get_connected_state_stub(LPDWORD, DWORD) + { + // Allow offline play + return TRUE; + } } void bd_logger_stub(const char* const function, const char* const msg, ...) @@ -390,6 +396,11 @@ namespace demonware if (function == "#52") return io::gethostbyname_stub; } + if (function == "InternetGetConnectedState") + { + return io::internet_get_connected_state_stub; + } + return nullptr; }