mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Improve icon alignments on main and game screens
This commit is contained in:
2 files changed
+13
-7
No files matched your search
@@ -757,10 +757,11 @@ void GameIconView::Draw(UIContext &dc) {
|
||||
// Adjust size so we don't stretch the image vertically or horizontally.
|
||||
// Make sure it's not wider than 144 (like Doom Legacy homebrew), ugly in the grid mode.
|
||||
float nw = std::min(bounds_.h * textureWidth_ / textureHeight_, (float)bounds_.w);
|
||||
int x = bounds_.x + (bounds_.w - nw) / 2.0f;
|
||||
|
||||
dc.Flush();
|
||||
dc.GetDrawContext()->BindTexture(0, texture);
|
||||
dc.Draw()->Rect(bounds_.x, bounds_.y, nw, bounds_.h, color);
|
||||
dc.Draw()->Rect(x, bounds_.y, nw, bounds_.h, color);
|
||||
dc.Flush();
|
||||
dc.RebindTexture();
|
||||
}
|
||||
Reference in new issue
Block a user