From 62243501429fd1c054c530cfed7920d0b52d1f30 Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Wed, 14 Aug 2019 18:11:00 +0200 Subject: [PATCH] Fixed compilation for windows --- .gitignore | 3 ++- dll/dll.cpp | 2 ++ download_glew.sh | 12 ++++++++++++ overlay_experimental/steam_overlay.h | 6 +++--- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 download_glew.sh diff --git a/.gitignore b/.gitignore index 21b8995..f6ed44a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ base.lib rtlgenrandom* steamclient.exp steamclient.lib -out/* \ No newline at end of file +out/* +glew diff --git a/dll/dll.cpp b/dll/dll.cpp index c99558b..9395b50 100644 --- a/dll/dll.cpp +++ b/dll/dll.cpp @@ -204,7 +204,9 @@ S_API bool S_CALLTYPE SteamAPI_Init() Steam_Client* client = get_steam_client(); client->userLogIn(); +#ifndef NO_OVERLAY client->steam_overlay->SetupOverlay(); +#endif return true; } diff --git a/download_glew.sh b/download_glew.sh new file mode 100755 index 0000000..7214a1b --- /dev/null +++ b/download_glew.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +rm -rf glew* + +URL="https://downloads.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0-win32.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fglew%2Ffiles%2Fglew%2F2.1.0%2Fglew-2.1.0-win32.zip%2Fdownload&ts=1565791827" + +wget "$URL" -O glew.zip +unzip glew.zip +rm glew.zip +mv glew-* glew +# Fix libraries name +sed -i "s/LIBCMT/libcmt/;s/OLDNAMES/oldnames/" glew/lib/Release/*/glew32s.lib diff --git a/overlay_experimental/steam_overlay.h b/overlay_experimental/steam_overlay.h index 4a6bf22..bd80474 100644 --- a/overlay_experimental/steam_overlay.h +++ b/overlay_experimental/steam_overlay.h @@ -124,10 +124,10 @@ public: class Steam_Overlay { public: - Steam_Overlay(Settings* settings, SteamCallResults* callback_results, SteamCallBacks* callbacks, RunEveryRunCB* run_every_runcb, Networking *network); - ~Steam_Overlay(); + Steam_Overlay(Settings* settings, SteamCallResults* callback_results, SteamCallBacks* callbacks, RunEveryRunCB* run_every_runcb, Networking *network) {} + ~Steam_Overlay() {} - bool Ready() const { return false: } + bool Ready() const { return false; } bool NeedPresent() const { return false; }