mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
Compare commits
8 commits
46ca02ace7
...
4631fcf859
Author | SHA1 | Date | |
---|---|---|---|
|
4631fcf859 | ||
|
01807fedc9 | ||
|
22a11b96e2 | ||
|
6679a690a2 | ||
|
ebd4c920f5 | ||
|
71f56ef49e | ||
|
1af10eea7f | ||
|
37fb2a3ddf |
6 changed files with 33 additions and 13 deletions
|
@ -10,10 +10,9 @@
|
|||
* Rewritten matjson library
|
||||
* Settings V2 completely removed, use V3 now
|
||||
* `JsonChecker` removed
|
||||
* Add new system for ordered hook priority (673317d, 6db3084)
|
||||
* See docs: LINK HERE!!
|
||||
* Add new system for ordered hook priority, [see docs](https://docs.geode-sdk.org/tutorials/hookpriority) (673317d, 6db3084)
|
||||
* 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)
|
||||
* 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
|
||||
|
|
|
@ -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](Event* event) mutable {
|
||||
[handle](typename NewTask::Event* event) mutable {
|
||||
if (auto v = event->getValue()) {
|
||||
NewTask::finish(handle.lock(), std::move(*v));
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
struct XINPUT_STATE;
|
||||
struct XINPUT_CAPABILITIES;
|
||||
struct XINPUT_VIBRATION;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#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");
|
||||
|
|
|
@ -8,6 +8,10 @@ $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");
|
||||
|
|
|
@ -330,9 +330,10 @@ 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 (download && download->isActive()) {
|
||||
if (isDownloading) {
|
||||
m_updateBtn->setVisible(false);
|
||||
m_restartRequiredLabel->setVisible(false);
|
||||
m_developers->setVisible(false);
|
||||
|
@ -431,7 +432,7 @@ void ModItem::updateState() {
|
|||
m_bg->setColor("mod-list-errors-found"_cc3b);
|
||||
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
||||
}
|
||||
if (!wantsRestart && targetsOutdated) {
|
||||
if (!wantsRestart && targetsOutdated && !isDownloading) {
|
||||
LoadProblem problem = targetsOutdated.value();
|
||||
m_bg->setColor("mod-list-outdated-label"_cc3b);
|
||||
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#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
|
||||
|
@ -183,19 +184,22 @@ server::ServerRequest<std::unordered_set<std::string>> ModSource::fetchValidTags
|
|||
return std::visit(makeVisitor {
|
||||
[](Mod* mod) {
|
||||
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()) {
|
||||
std::unordered_set<std::string> fetched = result->unwrap();
|
||||
// Filter out invalid tags
|
||||
auto modTags = mod->getMetadata().getTags();
|
||||
auto finalTags = std::unordered_set<std::string>();
|
||||
for (auto& tag : modTags) {
|
||||
if (result->unwrap().contains(tag)) {
|
||||
for (std::string const& tag : modTags) {
|
||||
if (fetched.contains(tag)) {
|
||||
finalTags.insert(tag);
|
||||
}
|
||||
}
|
||||
return Ok(finalTags);
|
||||
}
|
||||
return Ok(result->unwrap());
|
||||
|
||||
return Ok(finalTags);
|
||||
},
|
||||
[](server::ServerProgress* progress) {
|
||||
return *progress;
|
||||
|
|
Loading…
Reference in a new issue