mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-23 16:19:44 +00:00
Assorted fixes to auto resolution. Fixes too low resolution and also #8002, plus notification spam
This commit is contained in:
parent
eed2f9d9d5
commit
70cb4372c1
@ -847,5 +847,5 @@ void FramebufferManagerCommon::ShowScreenResolution() {
|
||||
messageStream << gr->T("Window Size") << ": ";
|
||||
messageStream << PSP_CoreParameter().pixelWidth << "x" << PSP_CoreParameter().pixelHeight;
|
||||
|
||||
osm.Show(messageStream.str(), 2.0f);
|
||||
osm.Show(messageStream.str(), 2.0f, 0xFFFFFF, -1, true, "resize");
|
||||
}
|
@ -1115,10 +1115,10 @@ namespace DX9 {
|
||||
int zoom = g_Config.iInternalResolution;
|
||||
if (zoom == 0) { // auto mode
|
||||
// Use the longest dimension
|
||||
if (g_Config.IsPortrait()) {
|
||||
zoom = (pixelWidth_ + 479) / 480;
|
||||
if (!g_Config.IsPortrait()) {
|
||||
zoom = (PSP_CoreParameter().pixelWidth + 479) / 480;
|
||||
} else {
|
||||
zoom = (pixelHeight_ + 479) / 480;
|
||||
zoom = (PSP_CoreParameter().pixelHeight + 479) / 480;
|
||||
}
|
||||
}
|
||||
if (zoom <= 1)
|
||||
|
@ -1667,10 +1667,10 @@ void FramebufferManager::EndFrame() {
|
||||
int zoom = g_Config.iInternalResolution;
|
||||
if (zoom == 0) { // auto mode
|
||||
// Use the longest dimension
|
||||
if (g_Config.IsPortrait()) {
|
||||
zoom = (pixelWidth_ + 479) / 480;
|
||||
if (!g_Config.IsPortrait()) {
|
||||
zoom = (PSP_CoreParameter().pixelWidth + 479) / 480;
|
||||
} else {
|
||||
zoom = (pixelHeight_ + 479) / 480;
|
||||
zoom = (PSP_CoreParameter().pixelHeight + 479) / 480;
|
||||
}
|
||||
}
|
||||
if (zoom <= 1)
|
||||
|
@ -807,8 +807,8 @@ rotateVBO:
|
||||
prim, decoded, indexGen.VertexCount(),
|
||||
dec_->VertexType(), inds, GE_VTYPE_IDX_16BIT, dec_->GetDecVtxFmt(),
|
||||
maxIndex, framebufferManager_, textureCache_, transformed, transformedExpanded, drawBuffer, numTrans, drawIndexed, &result, 1.0);
|
||||
|
||||
ApplyDrawStateLate();
|
||||
|
||||
LinkedShader *program = shaderManager_->ApplyFragmentShader(vshader, prim, lastVType_);
|
||||
|
||||
if (result.action == SW_DRAW_PRIMITIVES) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ class DrawBuffer;
|
||||
|
||||
class OnScreenMessages {
|
||||
public:
|
||||
void Show(const std::string &message, float duration_s = 1.0f, uint32_t color = 0xFFFFFF, int icon = -1, bool checkUnique = true);
|
||||
void Show(const std::string &message, float duration_s = 1.0f, uint32_t color = 0xFFFFFF, int icon = -1, bool checkUnique = true, const char *id = nullptr);
|
||||
void ShowOnOff(const std::string &message, bool b, float duration_s = 1.0f, uint32_t color = 0xFFFFFF, int icon = -1);
|
||||
bool IsEmpty() const { return messages_.empty(); }
|
||||
|
||||
@ -30,6 +30,7 @@ public:
|
||||
int icon;
|
||||
uint32_t color;
|
||||
std::string text;
|
||||
const char *id;
|
||||
double endTime;
|
||||
double duration;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user