Skip to content

Commit c501c17

Browse files
committed
last few changes
1 parent f63e0a1 commit c501c17

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 1.4.11
2+
### Sound effect separation
3+
- <cy>Separate sound effects per server</c>
4+
5+
# 1.4.10
6+
### Some bugfixes
7+
- <cy>Fix some bugs with save deletion</c>
18
# 1.4.9
29
- <cy>Bugfix.</c>
310
# 1.4.8

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mac": "2.2074",
77
"ios": "2.2074"
88
},
9-
"version": "1.4.10",
9+
"version": "1.4.11",
1010
"id": "km7dev.gdps-switcher",
1111
"name": "GDPS Switcher",
1212
"developers": ["km7dev", "Alphii"],

src/hooks/MusicDownloadManager.cpp

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,13 @@ using namespace geode::prelude;
88
class $modify(GDPSMDL, MusicDownloadManager) {
99

1010
std::string pathForSFXFolder(int id) {
11-
auto ret = MusicDownloadManager::pathForSFXFolder(id);
12-
if (!GDPSMain::get()->isActive()) return ret;
13-
log::info("{}", getGDPSPath(ret));
14-
return getGDPSPath(ret);
11+
if (!GDPSMain::get()->isActive()) return MusicDownloadManager::pathForSFXFolder(id);
12+
auto server = GDPSMain::get()->m_servers[GDPSMain::get()->m_currentServer];
13+
return string::pathToString(dirs::getSaveDir() / "gdpses" / server.saveDir / "");
1514
}
1615

1716
std::string pathForSongFolder(int id) {
18-
auto ret = MusicDownloadManager::pathForSongFolder(id);
19-
if (!GDPSMain::get()->isActive()) return ret;
20-
log::info("{}", getGDPSPath(ret));
21-
return getGDPSPath(ret);
22-
}
23-
24-
// cause gd::string
25-
inline std::string getGDPSPath(const gd::string& path) {
26-
return getGDPSPath(std::filesystem::path(path));
27-
}
28-
29-
std::string getGDPSPath(const std::filesystem::path& orig) {
17+
if (!GDPSMain::get()->isActive()) return MusicDownloadManager::pathForSongFolder(id);
3018
auto server = GDPSMain::get()->m_servers[GDPSMain::get()->m_currentServer];
3119
return string::pathToString(dirs::getSaveDir() / "gdpses" / server.saveDir / "");
3220
}

0 commit comments

Comments
 (0)