@@ -158,18 +158,24 @@ class $modify(MyPlayLayer, PlayLayer) {
158158 this ->scheduleOnce (schedule_selector (MyPlayLayer::PRNTSCRNOnDeath), .275f );
159159 }
160160 void PRNTSCRNOnDeath (float ) {
161- const std::string& screenshotOnDeathPreference = getModString (" screenshotOnDeathPreference" );
162- if (screenshotOnDeathPreference == " Keep UI" ) {
161+ if (!manager->hasPRNTSCRN || !MyPlayLayer::isNewBestFloat (this ) || !getModBool (" screenshotOnDeath" )) return ;
162+ Mod* prntscrn = Loader::get ()->getLoadedMod (" ninxout.prntscrn" );
163+ if (!prntscrn) return ;
164+ const std::string& screenshotOnDeathPreference = utils::string::toLower (getModString (" screenshotOnDeathPreference" ));
165+ const bool originalHidePlayerValue = prntscrn->getSettingValue <bool >(" hide-player" );
166+ prntscrn->setSettingValue <bool >(" hide-player" , false );
167+ log::info (" screenshotOnDeathPreference: {}" , screenshotOnDeathPreference);
168+ if (screenshotOnDeathPreference == " keep ui" ) {
163169 (void ) PRNTSCRN::screenshotNodeAdvanced (this , {FMODAudioEngine::get ()}, {" " _spr});
164- } else if (screenshotOnDeathPreference == " Hide (~99% of) UI" ) {
165- Mod* prntscrn = Loader::get ()->getLoadedMod (" ninxout.prntscrn" );
166- bool originalValue = prntscrn->getSettingValue <bool >(" hide-ui" );
170+ } else if (screenshotOnDeathPreference == " hide (~99% of) ui" ) {
171+ const bool originalHideUIValue = prntscrn->getSettingValue <bool >(" hide-ui" );
167172 prntscrn->setSettingValue <bool >(" hide-ui" , true );
168173 (void ) PRNTSCRN::screenshotNode (this );
169- prntscrn->setSettingValue <bool >(" hide-ui" , originalValue );
174+ prntscrn->setSettingValue <bool >(" hide-ui" , originalHideUIValue );
170175 } else {
171176 (void ) PRNTSCRN::screenshotNode (this );
172177 }
173178 (void ) PRNTSCRN::screenshotNodeAdvanced (CCScene::get (), {FMODAudioEngine::get ()}, {" " _spr});
179+ prntscrn->setSettingValue <bool >(" hide-ui" , originalHidePlayerValue);
174180 }
175181};
0 commit comments