mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Hook up progress bar, minor fixes
This commit is contained in:
1 parent
eaa1975ac9
commit
3b6989bff7
3 files changed
+22
-14
No files matched your search
+1
-1
@@ -320,7 +320,7 @@ static u32 _sceSasCoreWithMix(u32 core, u32 inoutAddr, int leftVolume, int right
|
||||
|
||||
static u32 sceSasSetVoice(u32 core, int voiceNum, u32 vagAddr, int size, int loop) {
|
||||
if (voiceNum >= PSP_SAS_VOICES_MAX || voiceNum < 0) {
|
||||
return hleLogWarning(SCESAS, ERROR_SAS_INVALID_VOICE, "invalid voicenum");
|
||||
return hleLogVerbose(SCESAS, ERROR_SAS_INVALID_VOICE, "invalid voicenum");
|
||||
}
|
||||
|
||||
if (size == 0 || ((u32)size & 0xF) != 0) {
|
||||
|
||||
+1
-1
@@ -347,7 +347,7 @@ void GamePauseScreen::CreateViews() {
|
||||
return UI::EVENT_DONE;
|
||||
});
|
||||
}
|
||||
if (g_Config.bAchievementsEnable && Achievements::IsActive()) {
|
||||
if (g_Config.bAchievementsEnable && Achievements::SafeHasAchievementsOrLeaderboards()) {
|
||||
rightColumnItems->Add(new Choice(pa->T("Achievements")))->OnClick.Add([&](UI::EventParams &e) {
|
||||
screenManager()->push(new RetroAchievementsListScreen(gamePath_));
|
||||
return UI::EVENT_DONE;
|
||||
|
||||
+20
-12
@@ -106,27 +106,35 @@ namespace Common {
|
||||
} // namespace
|
||||
|
||||
void OSDAddToast(float duration_s, const std::string &text) {
|
||||
// TODO: Improve.
|
||||
System_Toast(text.c_str());
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, text);
|
||||
}
|
||||
|
||||
void OSDAddNotification(float duration_s, const std::string &title, const std::string &summary, const std::string &iconImageData) {
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, title);
|
||||
}
|
||||
void OSDAddNotification(float duration_s, const std::string &title, const std::string &summary, const std::string &iconImageData) {}
|
||||
|
||||
void OSDOpenBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog opened: %s %s", str_id, message.c_str());
|
||||
}
|
||||
void OSDUpdateBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog updated: %s %s %d/(%d->%d)", str_id, message.c_str(), value, min, max);
|
||||
}
|
||||
void OSDCloseBackgroundProgressDialog(const char *str_id) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog closed: %s", str_id);
|
||||
g_OSD.SetProgressBar(str_id, std::move(message), min, max, value);
|
||||
}
|
||||
|
||||
void OSDAddKeyedMessage(const char *str_id, std::string message, float duration) {
|
||||
void OSDUpdateBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog updated: %s %s %d/(%d->%d)", str_id, message.c_str(), value, min, max);
|
||||
g_OSD.SetProgressBar(str_id, std::move(message), min, max, value);
|
||||
}
|
||||
|
||||
void OSDCloseBackgroundProgressDialog(const char *str_id) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog closed: %s", str_id);
|
||||
g_OSD.RemoveProgressBar(str_id, 0.25f);
|
||||
}
|
||||
|
||||
void OSDAddErrorMessage(const char *str_id, std::string message, float duration) {
|
||||
g_OSD.Show(OSDType::MESSAGE_ERROR, message);
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Keyed message: %s %s (%0.1f s)", str_id, message.c_str(), duration);
|
||||
}
|
||||
|
||||
void OSDDisplayLoadingScreen(const char *text) {
|
||||
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, text);
|
||||
}
|
||||
|
||||
namespace Host {
|
||||
@@ -1491,7 +1499,7 @@ void Achievements::GameChanged(const Path &path)
|
||||
// when we're booting the bios, this will fail
|
||||
if (!s_game_path.empty())
|
||||
{
|
||||
OSDAddKeyedMessage("retroachievements_disc_read_failed",
|
||||
OSDAddErrorMessage("retroachievements_disc_read_failed",
|
||||
"Failed to read executable from disc. Achievements disabled.", 10.0f);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user