Compare commits

..

8 commits

Author SHA1 Message Date
larzie
4631fcf859
Merge d86830028e into 01807fedc9 2024-11-14 00:29:58 +01:00
Fleeym
01807fedc9 fix(ModSource): fix bad unwrap in fetchValidTags
Some checks are pending
Build Binaries / Build Windows (push) Waiting to run
Build Binaries / Build macOS (push) Waiting to run
Build Binaries / Build Android (64-bit) (push) Waiting to run
Build Binaries / Build Android (32-bit) (push) Waiting to run
Build Binaries / Publish (push) Blocked by required conditions
Check CHANGELOG.md / Check CHANGELOG.md (push) Waiting to run
2024-11-13 23:19:07 +02:00
matcool
22a11b96e2 fix wrong type in Task::chain impl 2024-11-13 16:20:50 -03:00
Fleeym
6679a690a2 fix(ModItem): hide outdated label when updating 2024-11-13 19:48:47 +02:00
mat
ebd4c920f5
add placeholder link for new hook priority system
lets not forget to write docs for this..
2024-11-13 13:38:10 -03:00
dankmeme01
71f56ef49e add XInputSetState export in proxy loader, fixing certain steam emus
Some checks are pending
Build Binaries / Build Windows (push) Waiting to run
Build Binaries / Build macOS (push) Waiting to run
Build Binaries / Build Android (64-bit) (push) Waiting to run
Build Binaries / Build Android (32-bit) (push) Waiting to run
Build Binaries / Publish (push) Blocked by required conditions
Check CHANGELOG.md / Check CHANGELOG.md (push) Waiting to run
2024-11-13 14:59:12 +01:00
mat
1af10eea7f
add check for gd version in DynamicCastFix.cpp
prevents silently breaking macos
2024-11-13 10:41:13 -03:00
mat
37fb2a3ddf
missing commit hash on changelog 2024-11-13 10:06:00 -03:00
6 changed files with 33 additions and 13 deletions

View file

@ -10,10 +10,9 @@
* Rewritten matjson library * Rewritten matjson library
* Settings V2 completely removed, use V3 now * Settings V2 completely removed, use V3 now
* `JsonChecker` removed * `JsonChecker` removed
* Add new system for ordered hook priority (673317d, 6db3084) * Add new system for ordered hook priority, [see docs](https://docs.geode-sdk.org/tutorials/hookpriority) (673317d, 6db3084)
* See docs: LINK HERE!!
* C++20 coroutine support for `geode::Task`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#coroutines) (e61b2c0, ab196b9) * C++20 coroutine support for `geode::Task`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#coroutines) (e61b2c0, ab196b9)
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks) * Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks) (3248831)
* Single page local mods list (efb1fbf) * Single page local mods list (efb1fbf)
* Split mod problems into load and outdated (12e8bbb, 09fa872, df2528c) * Split mod problems into load and outdated (12e8bbb, 09fa872, df2528c)
* This means mods made for outdated gd or geode versions no longer count as actual errors, resulting in less clutter in the ui * This means mods made for outdated gd or geode versions no longer count as actual errors, resulting in less clutter in the ui

View file

@ -817,7 +817,7 @@ namespace geode {
// make the second event listener that waits for the mapper's task // make the second event listener that waits for the mapper's task
// and just forwards everything through // and just forwards everything through
static_cast<void*>(new EventListener<NewTask>( static_cast<void*>(new EventListener<NewTask>(
[handle](Event* event) mutable { [handle](typename NewTask::Event* event) mutable {
if (auto v = event->getValue()) { if (auto v = event->getValue()) {
NewTask::finish(handle.lock(), std::move(*v)); NewTask::finish(handle.lock(), std::move(*v));
} }

View file

@ -6,6 +6,7 @@
struct XINPUT_STATE; struct XINPUT_STATE;
struct XINPUT_CAPABILITIES; struct XINPUT_CAPABILITIES;
struct XINPUT_VIBRATION;
constexpr static auto MAX_PATH_CHARS = 32768u; constexpr static auto MAX_PATH_CHARS = 32768u;
@ -41,6 +42,17 @@ extern "C" DWORD XInputGetState(DWORD dwUserIndex, XINPUT_STATE *pState) {
return ERROR_DEVICE_NOT_CONNECTED; return ERROR_DEVICE_NOT_CONNECTED;
} }
#pragma comment(linker, "/export:XInputSetState,@3")
extern "C" DWORD XInputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) {
static auto fp = getFP("XInputSetState");
if (fp) {
using FPType = decltype(&XInputSetState);
return reinterpret_cast<FPType>(fp)(dwUserIndex, pVibration);
}
return ERROR_DEVICE_NOT_CONNECTED;
}
#pragma comment(linker, "/export:XInputGetCapabilities,@4") #pragma comment(linker, "/export:XInputGetCapabilities,@4")
extern "C" DWORD XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES *pCapabilities) { extern "C" DWORD XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES *pCapabilities) {
static auto fp = getFP("XInputGetCapabilities"); static auto fp = getFP("XInputGetCapabilities");

View file

@ -8,6 +8,10 @@ $execute {
// this is needed because the transitions in cocos uses dynamic cast to check // this is needed because the transitions in cocos uses dynamic cast to check
// layers, which fail on user layers due to typeinfo not matching // layers, which fail on user layers due to typeinfo not matching
#if defined(GEODE_IS_MAC) && GEODE_COMP_GD_VERSION != 22074
#error "Unsupported version for macOS dynamic cast fix, please update the addresses"
#endif
#if defined(GEODE_IS_INTEL_MAC) #if defined(GEODE_IS_INTEL_MAC)
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7ba1d8); void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7ba1d8);
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast"); (void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");

View file

@ -330,9 +330,10 @@ void ModItem::updateState() {
auto wantsRestart = m_source.wantsRestart(); auto wantsRestart = m_source.wantsRestart();
auto download = server::ModDownloadManager::get()->getDownload(m_source.getID()); auto download = server::ModDownloadManager::get()->getDownload(m_source.getID());
bool isDownloading = download && download->isActive();
// If there is an active download ongoing, show that in place of developer name // If there is an active download ongoing, show that in place of developer name
if (download && download->isActive()) { if (isDownloading) {
m_updateBtn->setVisible(false); m_updateBtn->setVisible(false);
m_restartRequiredLabel->setVisible(false); m_restartRequiredLabel->setVisible(false);
m_developers->setVisible(false); m_developers->setVisible(false);
@ -431,7 +432,7 @@ void ModItem::updateState() {
m_bg->setColor("mod-list-errors-found"_cc3b); m_bg->setColor("mod-list-errors-found"_cc3b);
m_bg->setOpacity(isGeodeTheme() ? 25 : 90); m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
} }
if (!wantsRestart && targetsOutdated) { if (!wantsRestart && targetsOutdated && !isDownloading) {
LoadProblem problem = targetsOutdated.value(); LoadProblem problem = targetsOutdated.value();
m_bg->setColor("mod-list-outdated-label"_cc3b); m_bg->setColor("mod-list-outdated-label"_cc3b);
m_bg->setOpacity(isGeodeTheme() ? 25 : 90); m_bg->setOpacity(isGeodeTheme() ? 25 : 90);

View file

@ -5,6 +5,7 @@
#include <Geode/ui/GeodeUI.hpp> #include <Geode/ui/GeodeUI.hpp>
#include <server/DownloadManager.hpp> #include <server/DownloadManager.hpp>
#include <Geode/binding/GameObject.hpp> #include <Geode/binding/GameObject.hpp>
#include <unordered_set>
LoadModSuggestionTask loadModSuggestion(LoadProblem const& problem) { LoadModSuggestionTask loadModSuggestion(LoadProblem const& problem) {
// Recommended / suggested are essentially the same thing for the purposes of this // Recommended / suggested are essentially the same thing for the purposes of this
@ -183,19 +184,22 @@ server::ServerRequest<std::unordered_set<std::string>> ModSource::fetchValidTags
return std::visit(makeVisitor { return std::visit(makeVisitor {
[](Mod* mod) { [](Mod* mod) {
return server::getTags().map( return server::getTags().map(
[mod](auto* result) -> Result<std::unordered_set<std::string>, server::ServerError> { [mod](Result<std::unordered_set<std::string>, server::ServerError>* result)
-> Result<std::unordered_set<std::string>, server::ServerError> {
std::unordered_set<std::string> finalTags;
auto modTags = mod->getMetadata().getTags();
if (result->isOk()) { if (result->isOk()) {
std::unordered_set<std::string> fetched = result->unwrap();
// Filter out invalid tags // Filter out invalid tags
auto modTags = mod->getMetadata().getTags(); for (std::string const& tag : modTags) {
auto finalTags = std::unordered_set<std::string>(); if (fetched.contains(tag)) {
for (auto& tag : modTags) {
if (result->unwrap().contains(tag)) {
finalTags.insert(tag); finalTags.insert(tag);
} }
} }
return Ok(finalTags);
} }
return Ok(result->unwrap());
return Ok(finalTags);
}, },
[](server::ServerProgress* progress) { [](server::ServerProgress* progress) {
return *progress; return *progress;