mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Improve reliability of "menu background music". Fix issue with mixed navigation mentioned in #8565
This commit is contained in:
parent
199ce4ef9e
commit
e1ebc12d7f
@ -16,8 +16,7 @@
|
||||
class AT3PlusReader {
|
||||
public:
|
||||
AT3PlusReader(const std::string &data)
|
||||
: file_((const uint8_t *)&data[0],
|
||||
(int32_t)data.size()),
|
||||
: file_((const uint8_t *)&data[0], (int32_t)data.size()),
|
||||
raw_data_(0),
|
||||
raw_data_size_(0),
|
||||
raw_offset_(0),
|
||||
@ -96,7 +95,7 @@ public:
|
||||
}
|
||||
file_.ascend();
|
||||
} else {
|
||||
ELOG("Could not descend into RIFF file");
|
||||
ELOG("Could not descend into RIFF file. Data size=%d", (int32_t)data.size());
|
||||
return;
|
||||
}
|
||||
sample_rate = samplesPerSec;
|
||||
|
@ -734,6 +734,7 @@ again:
|
||||
GameInfoWorkItem *item = new GameInfoWorkItem(gamePath, info);
|
||||
gameInfoWQ_->Add(item);
|
||||
|
||||
info->pending = true;
|
||||
info_[gamePath] = info;
|
||||
return info;
|
||||
}
|
||||
|
@ -1046,8 +1046,10 @@ UI::EventReturn MainScreen::OnGameHighlight(UI::EventParams &e) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((!highlightedGamePath_.empty() || e.a == FF_LOSTFOCUS) && !lockBackgroundAudio_)
|
||||
if ((!highlightedGamePath_.empty() || e.a == FF_LOSTFOCUS) && !lockBackgroundAudio_) {
|
||||
SetBackgroundAudioGame(highlightedGamePath_);
|
||||
}
|
||||
|
||||
lockBackgroundAudio_ = false;
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
@ -1135,7 +1137,7 @@ void MainScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
||||
RecreateViews();
|
||||
}
|
||||
if (dialog->tag() == "game") {
|
||||
if (!restoreFocusGamePath_.empty()) {
|
||||
if (!restoreFocusGamePath_.empty() && UI::IsFocusMovementEnabled()) {
|
||||
// Prevent the background from fading, since we just were displaying it.
|
||||
highlightedGamePath_ = restoreFocusGamePath_;
|
||||
highlightProgress_ = 1.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user