Skip to content

Commit

Permalink
address bugs found by ita_player and cyblancgd
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Oct 25, 2024
1 parent 2d6705e commit 12fba87
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/FMODAudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class $modify(MenuLoopFMODHook, FMODAudioEngine) {
return FMODAudioEngine::get()->playMusic(path, desiredShouldLoop, fadeInTime, channel);
if (fadeInTime == 0 && gdStringSucks == "shop.mp3") return;
if (shouldLoop && fadeInTime == 1.0f) {
if (!isMenuLoop) {
if (!isMenuLoop && !utils::string::contains(gdStringSucks, "/Library/Caches/")) {
log::info("non-menu loop found while playlist mode is enabled: {}", gdStringSucks);
return FMODAudioEngine::get()->playMusic(path, desiredShouldLoop, fadeInTime, channel);
}
Expand All @@ -44,7 +44,7 @@ class $modify(MenuLoopFMODHook, FMODAudioEngine) {
*/
log::info("menu loop detected.");
desiredShouldLoop = false;
// TODO: maybe ifdef these few lines. it works on macos intel
// T0D0: maybe ifdef these few lines. it works on macos intel
if (channel == 0) {
log::info("attempted to loop menu music on channel zero! see if on windows or not. aborting early.");
return;
Expand Down
12 changes: 11 additions & 1 deletion src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,17 @@ SongInfoObject* Utils::getSongInfoObject() {
std::string Utils::getSongName() {
const auto songInfo = Utils::getSongInfoObject();
if (!songInfo) return "";
return songInfo->m_songName;
std::string ret = songInfo->m_songName;
#ifndef __APPLE__
if (geode::utils::string::contains(ret, "nong")) {
std::string instructions = "open File Explorer and visit AppData/Local/GeometryDash/geode/mods/fleym.nongd/nongs";
#ifdef GEODE_IS_ANDROID
instructions = "open your file manager [preferably ZArchiver, otherwise you would need to close Geode/Geometry Dash] and visit Android/media/com.geode.launcher/save/geode/mods/fleym.nongd/nongs";
#endif
return fmt::format("{} (To find this song, {})", ret, instructions);
}
#endif
return ret;
}

std::string Utils::getSongArtist() {
Expand Down

0 comments on commit 12fba87

Please sign in to comment.