mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-23 16:19:44 +00:00
More focus handling issue fixing
This commit is contained in:
parent
fa3cdb0e3d
commit
29e9d0caa3
@ -39,7 +39,9 @@ public:
|
||||
codec = PSP_CODEC_AT3PLUS;
|
||||
break;
|
||||
case 0x270:
|
||||
// Dunno? 3rd Birthday has this.
|
||||
// Dunno? 3rd Birthday has this. Doesn't seem to work though.
|
||||
codec = PSP_CODEC_AT3;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@ -86,7 +88,7 @@ public:
|
||||
return;
|
||||
}
|
||||
sample_rate = samplesPerSec;
|
||||
decoder_ = new SimpleAudio(codec);
|
||||
decoder_ = new SimpleAudio(codec, sample_rate, num_channels);
|
||||
ILOG("read ATRAC, frames: %i, rate %i", numFrames, sample_rate);
|
||||
}
|
||||
|
||||
|
@ -704,7 +704,7 @@ UI::EventReturn GameBrowser::NavigateClick(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
MainScreen::MainScreen() : highlightProgress_(0.0f), prevHighlightProgress_(0.0f), backFromStore_(false) {
|
||||
MainScreen::MainScreen() : highlightProgress_(0.0f), prevHighlightProgress_(0.0f), backFromStore_(false), lockBackgroundAudio_(false) {
|
||||
System_SendMessage("event", "mainscreen");
|
||||
SetBackgroundAudioGame("");
|
||||
}
|
||||
@ -978,6 +978,7 @@ UI::EventReturn MainScreen::OnGameSelected(UI::EventParams &e) {
|
||||
std::string path = e.s;
|
||||
#endif
|
||||
SetBackgroundAudioGame(path);
|
||||
lockBackgroundAudio_ = true;
|
||||
screenManager()->push(new GameScreen(path));
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
@ -1001,8 +1002,9 @@ UI::EventReturn MainScreen::OnGameHighlight(UI::EventParams &e) {
|
||||
highlightProgress_ = 0.0f;
|
||||
}
|
||||
|
||||
if (!highlightedGamePath_.empty())
|
||||
if ((!highlightedGamePath_.empty() || e.a == FF_LOSTFOCUS) && !lockBackgroundAudio_)
|
||||
SetBackgroundAudioGame(highlightedGamePath_);
|
||||
lockBackgroundAudio_ = false;
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ private:
|
||||
std::string prevHighlightedGamePath_;
|
||||
float highlightProgress_;
|
||||
float prevHighlightProgress_;
|
||||
bool lockBackgroundAudio_;
|
||||
bool backFromStore_;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user