diff --git a/CMakeLists.txt b/CMakeLists.txt index e8a0369..24568e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_CXX_VISIBILITY_PRESET hidden) -project(FakeRate VERSION 1.2.6) +project(FakeRate VERSION 1.2.7) add_library(${PROJECT_NAME} SHARED src/FakeRate.cpp diff --git a/changelog.md b/changelog.md index 1ff0c81..98303f6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # Fake Rate Changelog +## v1.2.7 (2024-06-29) +- Fixed a bug that caused the game to crash when a difficulty face in the difficulty selection popup was clicked with More Difficulties uninstalled or disabled (again) + ## v1.2.6 (2024-06-29) - Fixed a bug that caused the More Difficulties difficulty face to be offset in the level info page diff --git a/mod.json b/mod.json index f5c04c5..11dc4a7 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "win": "2.206", "mac": "2.206" }, - "version": "v1.2.6", + "version": "v1.2.7", "id": "hiimjustin000.fake_rate", "name": "Fake Rate", "developer": "hiimjustin000", diff --git a/src/FREditPopup.cpp b/src/FREditPopup.cpp index 64a52cc..f33744a 100644 --- a/src/FREditPopup.cpp +++ b/src/FREditPopup.cpp @@ -249,7 +249,8 @@ void FRSetDifficultyPopup::createDifficultyToggle(CCMenu* menu, int difficulty, FakeRate::toggle(sender->getNormalImage(), true); m_selected = sender; }); - auto isToggled = difficulty == m_difficulty && (!Loader::get()->isModLoaded("uproxide.more_difficulties") || moreDifficultiesOverride == m_moreDifficultiesOverride); + auto isToggled = (moreDifficultiesOverride > 0 && moreDifficultiesOverride == m_moreDifficultiesOverride) || + (m_moreDifficultiesOverride <= 0 && m_difficulty == difficulty); FakeRate::toggle(toggle->getNormalImage(), isToggled); m_selected = isToggled ? toggle : m_selected; menu->addChild(toggle);