Skip to content

Commit

Permalink
Fixed macOS build and starting always in Offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Moresteck committed Feb 12, 2024
1 parent aa189fc commit 6581f5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,16 @@ if(APPLE)
set(CMAKE_APPLE_SILICON_PROCESSOR "arm64")

message(STATUS "${CMAKE_APPLE_SILICON_PROCESSOR}")
set(CMAKE_TOOLCHAIN_FILE "/Users/kazu/Programming/vcpkg/scripts/buildsystems/vcpkg.cmake")

if(CMAKE_APPLE_SILICON_PROCESSOR STREQUAL "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64")
file(COPY ${CMAKE_SOURCE_DIR}/lib/discord_game_sdk/aarch64/discord_game_sdk.dylib
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/ui/)

set(VCPKG_TARGET_ARCHITECTURE "arm64")
set(VCPKG_TARGET_TRIPLET arm64-osx)
elseif(CMAKE_APPLE_SILICON_PROCESSOR STREQUAL "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
file(COPY ${CMAKE_SOURCE_DIR}/lib/discord_game_sdk/x86_64/discord_game_sdk.dylib
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/ui/)

set(VCPKG_TARGET_ARCHITECTURE "x64")
set(VCPKG_TARGET_TRIPLET x64-osx)
endif()

set(VCPKG_LIBRARY_LINKAGE "static")
elseif (WIN32)
file(COPY ${CMAKE_SOURCE_DIR}/lib/discord_game_sdk/x86_64/discord_game_sdk.dll
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/ui/)
Expand Down
3 changes: 1 addition & 2 deletions src/core/Network.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ int bc_network_status() {

res = curl_easy_perform(curl);

// We expect the data to not be written, so CURLE_WRITE_ERROR is a successful scenario.
if (res != CURLE_WRITE_ERROR) {
if (res != CURLE_OK) {
bc_log("Failed: %s\n", curl_easy_strerror(res));
return 0;
}
Expand Down

0 comments on commit 6581f5f

Please sign in to comment.