Skip to content

Commit

Permalink
update geode version
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Sep 15, 2024
1 parent de6f190 commit 90aea69
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"geode": "3.0.0-beta.5",
"geode": "3.6.1",
"gd": {
"mac": "2.206",
"win": "2.206",
Expand Down
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ std::uint64_t getTimestampCompat() {
return extendedInfo->getTimestamp();
}

#ifdef GEODE_IS_WINDOWS
void CustomGJBaseGameLayer::queueButton_custom(int btnType, bool push, bool secondPlayer) {
#else
void CustomGJBaseGameLayer::queueButton(int btnType, bool push, bool secondPlayer) {
#endif
// this is another workaround for it not being very easy to pass arguments to things
// oh well, ig

Expand Down Expand Up @@ -162,7 +166,7 @@ void CustomGJBaseGameLayer::fixUntimedInputs() {
// windows workaround as queueButton and its vector insert is supposedly inlined everywhere!!
// as long as this is called before the timestamp is cleared, it should work
for (const auto& btn : this->m_queuedButtons) {
this->queueButton(static_cast<int>(btn.m_button), btn.m_isPush, btn.m_isPlayer2);
this->queueButton_custom(static_cast<int>(btn.m_button), btn.m_isPush, btn.m_isPlayer2);
}

this->m_queuedButtons.clear();
Expand Down
7 changes: 7 additions & 0 deletions src/main.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <Geode/Geode.hpp>

#include <Geode/modify/GJBaseGameLayer.hpp>

#include <queue>
Expand All @@ -19,7 +20,13 @@ struct CustomGJBaseGameLayer : geode::Modify<CustomGJBaseGameLayer, GJBaseGameLa
};

void update(float dt);

#ifdef GEODE_IS_WINDOWS
// lovely inlined function error
void queueButton_custom(int btnType, bool push, bool secondPlayer);
#else
void queueButton(int btnType, bool push, bool secondPlayer);
#endif
void resetLevelVariables();
void processCommands(float timeStep);

Expand Down

0 comments on commit 90aea69

Please sign in to comment.