diff --git a/qpm.json b/qpm.json index 10c977a..c4ce4d7 100644 --- a/qpm.json +++ b/qpm.json @@ -119,7 +119,7 @@ }, { "id": "beatsaverplusplus", - "versionRange": "^0.2.1", + "versionRange": "^0.2.2", "additionalData": {} }, { @@ -128,4 +128,4 @@ "additionalData": {} } ] -} +} \ No newline at end of file diff --git a/qpm.shared.json b/qpm.shared.json index fd8bd10..cace48c 100644 --- a/qpm.shared.json +++ b/qpm.shared.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/QuestPackageManager/QPM.Package/refs/heads/main/qpm.shared.schema.json", "config": { "version": "0.1.0", "sharedDir": "shared", @@ -119,7 +120,7 @@ }, { "id": "beatsaverplusplus", - "versionRange": "^0.2.1", + "versionRange": "^0.2.2", "additionalData": {} }, { @@ -132,60 +133,102 @@ "restoredDependencies": [ { "dependency": { - "id": "web-utils", - "versionRange": "=0.6.7", + "id": "sombrero", + "versionRange": "=0.1.43", "additionalData": { - "soLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.7/libweb-utils.so", - "debugSoLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.7/debug_libweb-utils.so", - "overrideSoName": "libweb-utils.so", - "modLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.7/WebUtils.qmod", - "branchName": "version/v0_6_7", + "headersOnly": true, + "branchName": "version/v0_1_43" + } + }, + "version": "0.1.43" + }, + { + "dependency": { + "id": "beatsaverplusplus", + "versionRange": "=0.2.2", + "additionalData": { + "soLink": "https://github.com/bsq-ports/BeatSaverPlusPlus/releases/download/v0.2.2/libbeatsaverplusplus.so", + "debugSoLink": "https://github.com/bsq-ports/BeatSaverPlusPlus/releases/download/v0.2.2/debug_libbeatsaverplusplus.so", + "overrideSoName": "libbeatsaverplusplus.so", + "modLink": "https://github.com/bsq-ports/BeatSaverPlusPlus/releases/download/v0.2.2/BeatSaverPlusPlus.qmod", + "branchName": "version/v0_2_2", "cmake": false } }, - "version": "0.6.7" + "version": "0.2.2" }, { "dependency": { - "id": "libil2cpp", - "versionRange": "=0.4.0", + "id": "bs-cordl", + "versionRange": "=4008.0.0", "additionalData": { "headersOnly": true, + "branchName": "version/v4008_0_0", "compileOptions": { - "systemIncludes": [ - "il2cpp/external/baselib/Include", - "il2cpp/external/baselib/Platforms/Android/Include" + "includePaths": [ + "include" + ], + "cppFeatures": [], + "cppFlags": [ + "-DNEED_UNSAFE_CSHARP", + "-fdeclspec", + "-DUNITY_2021", + "-DHAS_CODEGEN", + "-Wno-invalid-offsetof" ] } } }, - "version": "0.4.0" + "version": "4008.0.0" }, { "dependency": { - "id": "bsml", - "versionRange": "=0.4.55", + "id": "lapiz", + "versionRange": "=0.2.23", "additionalData": { - "soLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/libbsml.so", - "debugSoLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/debug_libbsml.so", - "overrideSoName": "libbsml.so", - "modLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/BSML.qmod", - "branchName": "version/v0_4_55", + "soLink": "https://github.com/raineaeternal/Lapiz/releases/download/v0.2.23/liblapiz.so", + "debugSoLink": "https://github.com/raineaeternal/Lapiz/releases/download/v0.2.23/debug_liblapiz.so", + "overrideSoName": "liblapiz.so", + "modLink": "https://github.com/raineaeternal/Lapiz/releases/download/v0.2.23/Lapiz.qmod", + "branchName": "version/v0_2_23", "cmake": true } }, - "version": "0.4.55" + "version": "0.2.23" }, { "dependency": { - "id": "sombrero", - "versionRange": "=0.1.43", + "id": "tinyxml2", + "versionRange": "=10.0.0", + "additionalData": { + "soLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/libtinyxml2.so", + "debugSoLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/debug_libtinyxml2.so", + "overrideSoName": "libtinyxml2.so", + "modLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/tinyxml2.qmod", + "branchName": "version/v10_0_0", + "cmake": true + } + }, + "version": "10.0.0" + }, + { + "dependency": { + "id": "fmt", + "versionRange": "=11.0.2", "additionalData": { "headersOnly": true, - "branchName": "version/v0_1_43" + "branchName": "version/v11_0_2", + "compileOptions": { + "systemIncludes": [ + "fmt/include/" + ], + "cppFlags": [ + "-DFMT_HEADER_ONLY" + ] + } } }, - "version": "0.1.43" + "version": "11.0.2" }, { "dependency": { @@ -201,33 +244,47 @@ }, { "dependency": { - "id": "songcore", - "versionRange": "=1.1.24", + "id": "web-utils", + "versionRange": "=0.6.7", "additionalData": { - "soLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.24/libsongcore.so", - "debugSoLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.24/debug_libsongcore.so", - "overrideSoName": "libsongcore.so", - "modLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.24/SongCore.qmod", - "branchName": "version/v1_1_24", - "cmake": true + "soLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.7/libweb-utils.so", + "debugSoLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.7/debug_libweb-utils.so", + "overrideSoName": "libweb-utils.so", + "modLink": "https://github.com/RedBrumbler/WebUtils/releases/download/v0.6.7/WebUtils.qmod", + "branchName": "version/v0_6_7", + "cmake": false } }, - "version": "1.1.24" + "version": "0.6.7" }, { "dependency": { - "id": "tinyxml2", - "versionRange": "=10.0.0", + "id": "libil2cpp", + "versionRange": "=0.4.0", "additionalData": { - "soLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/libtinyxml2.so", - "debugSoLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/debug_libtinyxml2.so", - "overrideSoName": "libtinyxml2.so", - "modLink": "https://github.com/MillzyDev/NDK-tinyxml2/releases/download/v10.0.0/tinyxml2.qmod", - "branchName": "version/v10_0_0", - "cmake": true + "headersOnly": true, + "compileOptions": { + "systemIncludes": [ + "il2cpp/external/baselib/Include", + "il2cpp/external/baselib/Platforms/Android/Include" + ] + } } }, - "version": "10.0.0" + "version": "0.4.0" + }, + { + "dependency": { + "id": "scotland2", + "versionRange": "=0.1.6", + "additionalData": { + "soLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.6/libsl2.so", + "debugSoLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.6/debug_libsl2.so", + "overrideSoName": "libsl2.so", + "branchName": "version/v0_1_6" + } + }, + "version": "0.1.6" }, { "dependency": { @@ -246,25 +303,6 @@ }, "version": "0.1.9" }, - { - "dependency": { - "id": "paper2_scotland2", - "versionRange": "=4.6.4", - "additionalData": { - "soLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/libpaper2_scotland2.so", - "overrideSoName": "libpaper2_scotland2.so", - "modLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/paper2_scotland2.qmod", - "branchName": "version/v4_6_4", - "compileOptions": { - "systemIncludes": [ - "shared/utfcpp/source" - ] - }, - "cmake": false - } - }, - "version": "4.6.4" - }, { "dependency": { "id": "custom-types", @@ -287,27 +325,22 @@ }, { "dependency": { - "id": "bs-cordl", - "versionRange": "=4008.0.0", + "id": "paper2_scotland2", + "versionRange": "=4.6.4", "additionalData": { - "headersOnly": true, - "branchName": "version/v4008_0_0", + "soLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/libpaper2_scotland2.so", + "overrideSoName": "libpaper2_scotland2.so", + "modLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/paper2_scotland2.qmod", + "branchName": "version/v4_6_4", "compileOptions": { - "includePaths": [ - "include" - ], - "cppFeatures": [], - "cppFlags": [ - "-DNEED_UNSAFE_CSHARP", - "-fdeclspec", - "-DUNITY_2021", - "-DHAS_CODEGEN", - "-Wno-invalid-offsetof" + "systemIncludes": [ + "shared/utfcpp/source" ] - } + }, + "cmake": false } }, - "version": "4008.0.0" + "version": "4.6.4" }, { "dependency": { @@ -342,65 +375,33 @@ }, { "dependency": { - "id": "lapiz", - "versionRange": "=0.2.23", + "id": "songcore", + "versionRange": "=1.1.24", "additionalData": { - "soLink": "https://github.com/raineaeternal/Lapiz/releases/download/v0.2.23/liblapiz.so", - "debugSoLink": "https://github.com/raineaeternal/Lapiz/releases/download/v0.2.23/debug_liblapiz.so", - "overrideSoName": "liblapiz.so", - "modLink": "https://github.com/raineaeternal/Lapiz/releases/download/v0.2.23/Lapiz.qmod", - "branchName": "version/v0_2_23", + "soLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.24/libsongcore.so", + "debugSoLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.24/debug_libsongcore.so", + "overrideSoName": "libsongcore.so", + "modLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.24/SongCore.qmod", + "branchName": "version/v1_1_24", "cmake": true } }, - "version": "0.2.23" - }, - { - "dependency": { - "id": "scotland2", - "versionRange": "=0.1.6", - "additionalData": { - "soLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.6/libsl2.so", - "debugSoLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.6/debug_libsl2.so", - "overrideSoName": "libsl2.so", - "branchName": "version/v0_1_6" - } - }, - "version": "0.1.6" - }, - { - "dependency": { - "id": "beatsaverplusplus", - "versionRange": "=0.2.1", - "additionalData": { - "soLink": "https://github.com/bsq-ports/BeatSaverPlusPlus/releases/download/v0.2.1/libbeatsaverplusplus.so", - "debugSoLink": "https://github.com/bsq-ports/BeatSaverPlusPlus/releases/download/v0.2.1/debug_libbeatsaverplusplus.so", - "overrideSoName": "libbeatsaverplusplus.so", - "modLink": "https://github.com/bsq-ports/BeatSaverPlusPlus/releases/download/v0.2.1/BeatSaverPlusPlus.qmod", - "branchName": "version/v0_2_1", - "cmake": false - } - }, - "version": "0.2.1" + "version": "1.1.24" }, { "dependency": { - "id": "fmt", - "versionRange": "=11.0.2", + "id": "bsml", + "versionRange": "=0.4.55", "additionalData": { - "headersOnly": true, - "branchName": "version/v11_0_2", - "compileOptions": { - "systemIncludes": [ - "fmt/include/" - ], - "cppFlags": [ - "-DFMT_HEADER_ONLY" - ] - } + "soLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/libbsml.so", + "debugSoLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/debug_libbsml.so", + "overrideSoName": "libbsml.so", + "modLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/BSML.qmod", + "branchName": "version/v0_4_55", + "cmake": true } }, - "version": "11.0.2" + "version": "0.4.55" } ] } \ No newline at end of file diff --git a/src/Beatmaps/BeatSaverPreviewMediaData.cpp b/src/Beatmaps/BeatSaverPreviewMediaData.cpp index 37d30d8..69a74db 100644 --- a/src/Beatmaps/BeatSaverPreviewMediaData.cpp +++ b/src/Beatmaps/BeatSaverPreviewMediaData.cpp @@ -30,7 +30,7 @@ namespace MultiplayerCore::Beatmaps { } if (!_coverImageTask || _coverImageTask->IsCancellationRequested) { - _coverImageTask = StartThread([this]() -> UnityEngine::Sprite* { + _coverImageTask = StartTask([this]() -> UnityEngine::Sprite* { auto beatmapRes = BeatSaver::API::GetBeatmapByHash(_levelHash); if (beatmapRes.DataParsedSuccessful()) { auto versions = beatmapRes.responseData->GetVersions(); @@ -70,7 +70,7 @@ namespace MultiplayerCore::Beatmaps { } if (!_audioClipTask || _audioClipTask->IsCancellationRequested) { - _audioClipTask = StartThread([this]() -> UnityEngine::AudioClip* { + _audioClipTask = StartTask([this]() -> UnityEngine::AudioClip* { auto beatmapRes = BeatSaver::API::GetBeatmapByHash(_levelHash); if (beatmapRes.DataParsedSuccessful()) { diff --git a/src/Hooks/PlatformAuthenticationTokenProviderHooks.cpp b/src/Hooks/PlatformAuthenticationTokenProviderHooks.cpp index 4375831..66b0878 100644 --- a/src/Hooks/PlatformAuthenticationTokenProviderHooks.cpp +++ b/src/Hooks/PlatformAuthenticationTokenProviderHooks.cpp @@ -34,7 +34,7 @@ System::Threading::Tasks::Task_1*, GlobalN if (isPico.load()) self->_platform = GlobalNamespace::AuthenticationToken::Platform(20); // Set platform to 20 for Pico auto t = PlatformAuthenticationTokenProvider_GetAuthenticationToken(self); - return MultiplayerCore::StartThread([=](){ + return MultiplayerCore::StartTask([=](){ using namespace std::chrono_literals; while (!(t->IsCompleted || t->IsCanceled)) std::this_thread::sleep_for(50ms); GlobalNamespace::AuthenticationToken token = t->ResultOnSuccess; @@ -110,7 +110,7 @@ MAKE_AUTO_HOOK_ORIG_MATCH(OculusPlatformUserModel_GetUserInfo, &GlobalNamespace: if (isPico.load()) { DEBUG("Got Orig task, on Pico, starting custom task"); try { - return MultiplayerCore::StartThread([=](){ + return MultiplayerCore::StartTask([=](){ using namespace std::chrono_literals; DEBUG("Start UserInfoTask"); while (!(t->IsCompleted || t->IsCanceled)) std::this_thread::sleep_for(50ms); diff --git a/src/Hooks/ProvideBeatsaverLevelHooks.cpp b/src/Hooks/ProvideBeatsaverLevelHooks.cpp index 4330e86..35b526e 100644 --- a/src/Hooks/ProvideBeatsaverLevelHooks.cpp +++ b/src/Hooks/ProvideBeatsaverLevelHooks.cpp @@ -25,7 +25,7 @@ MAKE_AUTO_HOOK_MATCH(BeatmapLevelsModel_CheckBeatmapLevelDataExistsAsync, &Globa if (SongCore::API::Loading::GetLevelByHash(levelHash)) return t; // custom level, not locally available, get on beatsaver - return MultiplayerCore::StartThread([=](){ + return MultiplayerCore::StartTask([=](){ using namespace std::chrono_literals; while (!(t->IsCompleted || t->IsCanceled)) std::this_thread::sleep_for(50ms); // if orig says it's available, cool beans diff --git a/src/Objects/MpEntitlementChecker.cpp b/src/Objects/MpEntitlementChecker.cpp index 5615228..75d765a 100644 --- a/src/Objects/MpEntitlementChecker.cpp +++ b/src/Objects/MpEntitlementChecker.cpp @@ -81,7 +81,7 @@ namespace MultiplayerCore::Objects { // therefore we get the base task before we enter our own new task which will await things, and is the one that we will return auto baseTask = NetworkPlayerEntitlementChecker::GetEntitlementStatus(levelId); - auto task = StartThread([this, baseTask, levelId](){ + auto task = StartTask([this, baseTask, levelId](){ using namespace std::chrono_literals; std::string levelHash(HashFromLevelID(levelId)); diff --git a/src/Objects/MpLevelLoader.cpp b/src/Objects/MpLevelLoader.cpp index d210d87..c4586f6 100644 --- a/src/Objects/MpLevelLoader.cpp +++ b/src/Objects/MpLevelLoader.cpp @@ -145,7 +145,7 @@ namespace MultiplayerCore::Objects { } System::Threading::Tasks::Task_1* MpLevelLoader::StartDownloadBeatmapLevelAsyncTask(std::string levelId, System::Threading::CancellationToken cancellationToken) { - return StartThread([this, levelId](CancellationToken token) -> GlobalNamespace::LoadBeatmapLevelDataResult { + return StartTask([this, levelId](CancellationToken token) -> GlobalNamespace::LoadBeatmapLevelDataResult { try { auto success = _levelDownloader->TryDownloadLevelAsync(levelId, std::bind(&MpLevelLoader::Report, this, std::placeholders::_1)).get(); if (!success) {