Skip to content

Commit cfbdd36

Browse files
committed
menu loop fix
1 parent 5c21cca commit cfbdd36

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# v2.1.3
22

33
- Fixed GDPS Hub background
4+
- Fixed menu loop being silent
45

56
# v2.1.2
67

src/layers/GYSettingSelectLayer.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -237,20 +237,20 @@ bool GYSettingSelectLayer::init() {
237237
colorBtn->setID("color-button");
238238
leftMenu->addChild(colorBtn);
239239

240-
auto geodeLoopToggle = CCMenuItemExt::createToggler(
241-
CCSprite::createWithSpriteFrameName("GJ_fxOnBtn_001.png"),
242-
CCSprite::createWithSpriteFrameName("GJ_fxOffBtn_001.png"),
243-
[&](CCMenuItemToggler* toggler) {
244-
auto fmod = FMODAudioEngine::sharedEngine();
245-
if (toggler->isOn()) {
246-
Mod::get()->setSettingValue("menu-loop", false);
247-
} else {
248-
Mod::get()->setSettingValue("menu-loop", true);
249-
}
250-
fmod->playMusic("menuLoop.mp3", true, 0.5f, 1.0f);
251-
}
252-
);
253-
leftMenu->addChild(geodeLoopToggle);
240+
// auto geodeLoopToggle = CCMenuItemExt::createToggler(
241+
// CCSprite::createWithSpriteFrameName("GJ_fxOnBtn_001.png"),
242+
// CCSprite::createWithSpriteFrameName("GJ_fxOffBtn_001.png"),
243+
// [&](CCMenuItemToggler* toggler) {
244+
// auto fmod = FMODAudioEngine::sharedEngine();
245+
// if (toggler->isOn()) {
246+
// Mod::get()->setSettingValue("menu-loop", false);
247+
// } else {
248+
// Mod::get()->setSettingValue("menu-loop", true);
249+
// }
250+
// fmod->playMusic("menuLoop.mp3", true, 0.5f, 1.0f);
251+
// }
252+
// );
253+
// leftMenu->addChild(geodeLoopToggle);
254254

255255
CCMenuItemSpriteExtra* settingsBtn = CCMenuItemSpriteExtra::create(
256256
CircleButtonSprite::create(

src/modify/FMODAudioEngine.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/// @todo: Fix this code - on Windows its fine, but on Android it bugs out.
22
/// I'm not going to work on this right now, but I'll leave it here for future reference. (@OmgRod)
33

4-
#include <Geode/Geode.hpp>
5-
#include <Geode/modify/FMODAudioEngine.hpp>
4+
// #include <Geode/Geode.hpp>
5+
// #include <Geode/modify/FMODAudioEngine.hpp>
66

7-
using namespace geode::prelude;
7+
// using namespace geode::prelude;
88

9-
class $modify(MyFMODAudioEngine, FMODAudioEngine) {
10-
public:
11-
void playMusic(gd::string name, bool shouldLoop, float fadeInTime, int channel) {
12-
log::debug("Playing music: {}", name);
13-
std::string newName = "ninxout.wav"_spr;
14-
std::string nameStr = name.c_str();
15-
if (nameStr.find("menuLoop.mp3") != std::string::npos && Mod::get()->getSettingValue<bool>("menu-loop")) {
16-
name = newName;
17-
log::debug("Changed music to: {}", name);
18-
}
9+
// class $modify(MyFMODAudioEngine, FMODAudioEngine) {
10+
// public:
11+
// void playMusic(gd::string name, bool shouldLoop, float fadeInTime, int channel) {
12+
// log::debug("Playing music: {}", name);
13+
// std::string newName = "ninxout.wav"_spr;
14+
// std::string nameStr = name.c_str();
15+
// if (nameStr.find("menuLoop.mp3") != std::string::npos && Mod::get()->getSettingValue<bool>("menu-loop")) {
16+
// name = newName;
17+
// log::debug("Changed music to: {}", name);
18+
// }
1919

20-
FMODAudioEngine::playMusic(name, shouldLoop, fadeInTime, channel);
21-
}
22-
};
20+
// FMODAudioEngine::playMusic(name, shouldLoop, fadeInTime, channel);
21+
// }
22+
// };

0 commit comments

Comments
 (0)