mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Assorted fixes to auto resolution. Fixes too low resolution and also #8002, plus notification spam
This commit is contained in:
1 parent
eed2f9d9d5
commit
70cb4372c1
6 files changed
+16
-12
No files matched your search
@@ -53,14 +53,16 @@ restart:
|
||||
}
|
||||
}
|
||||
|
||||
void OnScreenMessages::Show(const std::string &message, float duration_s, uint32_t color, int icon, bool checkUnique) {
|
||||
void OnScreenMessages::Show(const std::string &text, float duration_s, uint32_t color, int icon, bool checkUnique, const char *id) {
|
||||
double now = time_now_d();
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex_);
|
||||
if (checkUnique) {
|
||||
for (auto iter = messages_.begin(); iter != messages_.end(); ++iter) {
|
||||
if (iter->text == message) {
|
||||
if (iter->text == text || (id && !strcmp(iter->id, id))) {
|
||||
Message msg = *iter;
|
||||
msg.endTime = now + duration_s;
|
||||
msg.text = text;
|
||||
msg.color = color;
|
||||
messages_.erase(iter);
|
||||
messages_.insert(messages_.begin(), msg);
|
||||
return;
|
||||
@@ -68,10 +70,11 @@ void OnScreenMessages::Show(const std::string &message, float duration_s, uint32
|
||||
}
|
||||
}
|
||||
Message msg;
|
||||
msg.text = message;
|
||||
msg.text = text;
|
||||
msg.color = color;
|
||||
msg.endTime = now + duration_s;
|
||||
msg.icon = icon;
|
||||
msg.id = id;
|
||||
messages_.insert(messages_.begin(), msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user