diff --git a/CMakeLists.txt b/CMakeLists.txt index 723373b..638fb17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,15 @@ # include some defines automatically made by qpm include(qpm_defines.cmake) +# override mod id +set(MOD_ID "Streamer-Tools") + # Enable link time optimization # In my experience, this can be highly unstable but it nets a huge size optimization and likely performance # However, the instability was seen using Android.mk/ndk-build builds. With Ninja + CMake, this problem seems to have been solved. # As always, test thoroughly # - Fern -set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +# set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) cmake_minimum_required(VERSION 3.21) project(${COMPILE_ID}) @@ -21,7 +24,7 @@ set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) # compile options used add_compile_options(-frtti -fexceptions) -add_compile_options(-Ofast) +add_compile_options(-O3) # compile definitions used add_compile_definitions(VERSION=\"${MOD_VERSION}\") add_compile_definitions(ID=\"${MOD_ID}\") @@ -41,8 +44,6 @@ add_library( target_include_directories(${COMPILE_ID} PRIVATE .) -target_include_directories(${COMPILE_ID} PRIVATE extern/includes/questui_components) - # add src dir as include dir target_include_directories(${COMPILE_ID} PRIVATE ${SOURCE_DIR}) # add include dir as include dir diff --git a/mod.json b/mod.json index 3e34827..f991286 100644 --- a/mod.json +++ b/mod.json @@ -3,33 +3,33 @@ "name": "Streamer Tools", "id": "Streamer-Tools", "author": "EnderdracheLP, ComputerElite, Lauriethefish, Phaze", - "version": "0.3.0-Dev", + "version": "0.3.0", "packageId": "com.beatgames.beatsaber", - "packageVersion": "1.19.0", + "packageVersion": "1.19.1", "description": "Allows applications to get information from the game like, currently played song.", "coverImage": "cover.png", "dependencies": [ { - "version": "^0.15.6", + "version": "^0.15.7", "id": "custom-types", - "downloadIfMissing": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.6/CustomTypes.qmod" + "downloadIfMissing": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.8/CustomTypes.qmod" }, { - "version": "^0.19.3", + "version": "^0.20.0", "id": "codegen", - "downloadIfMissing": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.19.3/Codegen.qmod" + "downloadIfMissing": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.20.0/Codegen.qmod" }, { - "version": "^0.13.1", + "version": "^0.13.2", "id": "questui", - "downloadIfMissing": "https://github.com/darknight1050/questui/releases/download/v0.13.1/QuestUI.qmod" + "downloadIfMissing": "https://github.com/darknight1050/questui/releases/download/v0.13.2/QuestUI.qmod" } ], "modFiles": [ "libStreamer-Tools.so" ], "libraryFiles": [ - "libbeatsaber-hook_3_6_7.so" + "libbeatsaber-hook_3_6_8.so" ], "fileCopies": [], "copyExtensions": [] diff --git a/mod.template.json b/mod.template.json index 45c1101..ad95d99 100644 --- a/mod.template.json +++ b/mod.template.json @@ -5,7 +5,7 @@ "author": "EnderdracheLP, ComputerElite, Lauriethefish, Phaze", "version": "${version}", "packageId": "com.beatgames.beatsaber", - "packageVersion": "1.19.0", + "packageVersion": "1.19.1", "description": "Allows applications to get information from the game like, currently played song.", "coverImage": "cover.png", "dependencies": [], diff --git a/qpm.json b/qpm.json index f5dc9c6..57370cb 100644 --- a/qpm.json +++ b/qpm.json @@ -4,7 +4,7 @@ "info": { "name": "Streamer Tools", "id": "Streamer-Tools", - "version": "0.3.0-Dev", + "version": "0.3.0", "url": null, "additionalData": { "overrideSoName": "libStreamer-Tools.so" @@ -13,7 +13,7 @@ "dependencies": [ { "id": "beatsaber-hook", - "versionRange": "^3.6.7", + "versionRange": "^3.6.8", "additionalData": { "extraFiles": [ "src/inline-hook" @@ -22,17 +22,17 @@ }, { "id": "codegen", - "versionRange": "^0.19.3", + "versionRange": "^0.20.0", "additionalData": {} }, { "id": "questui", - "versionRange": "^0.13.1", + "versionRange": "^0.13.2", "additionalData": {} }, { "id": "custom-types", - "versionRange": "^0.15.6", + "versionRange": "^0.15.7", "additionalData": {} }, { diff --git a/src/main.cpp b/src/main.cpp index 0b66303..f2a3585 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,6 +78,7 @@ #include "GlobalNamespace/PauseController.hpp" #include "GlobalNamespace/AudioTimeSyncController.hpp" #include "GlobalNamespace/MultiplayerSpectatorController.hpp" +#include "GlobalNamespace/MultiplayerSessionManager_SessionType.hpp" using namespace GlobalNamespace; #if !defined(MAKE_HOOK_MATCH) @@ -365,8 +366,8 @@ void onLobbyDisconnect() { stManager->statusLock.unlock(); } -MAKE_HOOK_FIND_VERBOSE(MultiplayerJoinLobby, il2cpp_utils::FindMethodUnsafe("", "MultiplayerSessionManager", "StartSession", 1), void, MultiplayerSessionManager* self, ConnectedPlayerManager* connectedPlayerManager) { - MultiplayerJoinLobby(self, connectedPlayerManager); +MAKE_HOOK_MATCH(MultiplayerJoinLobby, &MultiplayerSessionManager::StartSession, void, MultiplayerSessionManager* self, GlobalNamespace::MultiplayerSessionManager_SessionType sessionType, ConnectedPlayerManager* connectedPlayerManager) { + MultiplayerJoinLobby(self, sessionType, connectedPlayerManager); int maxPlayers = self->get_maxPlayerCount(); int numActivePlayers = self->get_connectedPlayerCount();