Skip to content

Commit

Permalink
OSD: Update OSD Text on SW mode so no overlap keyword appears (#11881)
Browse files Browse the repository at this point in the history
  • Loading branch information
knight-ryu12 authored Oct 9, 2024
1 parent 1c1f67c commit 8d6633f
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions pcsx2/GS/GS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,14 +644,37 @@ void GSgetStats(SmallStringBase& info)
{
const double fps = GetVerticalFrequency();
const double fillrate = pm.Get(GSPerfMon::Fillrate);
info.format("{} SW | {} S | {} P | {} D | {:.2f} U | {:.2f} D | {:.2f} mpps",
double pps = fps * fillrate;
char prefix = '\0';

if (pps >= 170000000)
{
pps /= 1073741824; // Gpps
prefix = 'G';
}
else if (pps >= 35000000)
{
pps /= 1048576; // Mpps
prefix = 'M';
}
else if (pps >= 1024)
{
pps /= 1024;
prefix = 'K';
}
else
{
prefix = '\0';
}

info.format("{} SW | {} SP | {} P | {} D | {:.2f} S | {:.2f} U | {:.2f} {}pps",
api_name,
(int)pm.Get(GSPerfMon::SyncPoint),
(int)pm.Get(GSPerfMon::Prim),
(int)pm.Get(GSPerfMon::Draw),
pm.Get(GSPerfMon::Swizzle) / 1024,
pm.Get(GSPerfMon::Unswizzle) / 1024,
fps * fillrate / (1024 * 1024));
pps,prefix);
}
else if (GSCurrentRenderer == GSRendererType::Null)
{
Expand Down

0 comments on commit 8d6633f

Please sign in to comment.