Compare commits

..

1 commit

Author SHA1 Message Date
larzie
46ca02ace7
Merge d86830028e into 290e0e0a34 2024-11-13 06:36:20 -05:00
6 changed files with 13 additions and 33 deletions

View file

@ -10,9 +10,10 @@
* Rewritten matjson library
* Settings V2 completely removed, use V3 now
* `JsonChecker` removed
* Add new system for ordered hook priority, [see docs](https://docs.geode-sdk.org/tutorials/hookpriority) (673317d, 6db3084)
* Add new system for ordered hook priority (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)
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks) (3248831)
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks)
* Single page local mods list (efb1fbf)
* 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

View file

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

View file

@ -6,7 +6,6 @@
struct XINPUT_STATE;
struct XINPUT_CAPABILITIES;
struct XINPUT_VIBRATION;
constexpr static auto MAX_PATH_CHARS = 32768u;
@ -42,17 +41,6 @@ extern "C" DWORD XInputGetState(DWORD dwUserIndex, XINPUT_STATE *pState) {
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")
extern "C" DWORD XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES *pCapabilities) {
static auto fp = getFP("XInputGetCapabilities");

View file

@ -8,10 +8,6 @@ $execute {
// this is needed because the transitions in cocos uses dynamic cast to check
// 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)
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7ba1d8);
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");

View file

@ -330,10 +330,9 @@ void ModItem::updateState() {
auto wantsRestart = m_source.wantsRestart();
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 (isDownloading) {
if (download && download->isActive()) {
m_updateBtn->setVisible(false);
m_restartRequiredLabel->setVisible(false);
m_developers->setVisible(false);
@ -432,7 +431,7 @@ void ModItem::updateState() {
m_bg->setColor("mod-list-errors-found"_cc3b);
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
}
if (!wantsRestart && targetsOutdated && !isDownloading) {
if (!wantsRestart && targetsOutdated) {
LoadProblem problem = targetsOutdated.value();
m_bg->setColor("mod-list-outdated-label"_cc3b);
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);

View file

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