mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-10 21:40:43 +00:00
avoid update of window title
only update title if user really wants to display the FPS during gameplay.
This commit is contained in:
parent
60f3ed7607
commit
2850d0c6bc
@ -280,13 +280,18 @@ void gs_frame::flip(draw_context_t, bool /*skip_frame*/)
|
|||||||
{
|
{
|
||||||
static Timer fps_t;
|
static Timer fps_t;
|
||||||
|
|
||||||
|
if (!m_show_fps_in_title && !g_cfg.misc.show_fps_in_title)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
++m_frames;
|
++m_frames;
|
||||||
|
|
||||||
if (fps_t.GetElapsedTimeInSec() >= 0.5)
|
if (fps_t.GetElapsedTimeInSec() >= 0.5)
|
||||||
{
|
{
|
||||||
QString fps_title;
|
QString fps_title;
|
||||||
|
|
||||||
if (g_cfg.misc.show_fps_in_title)
|
if ((m_show_fps_in_title = g_cfg.misc.show_fps_in_title.get()))
|
||||||
{
|
{
|
||||||
fps_title = qstr(fmt::format("FPS: %.2f", (double)m_frames / fps_t.GetElapsedTimeInSec()));
|
fps_title = qstr(fmt::format("FPS: %.2f", (double)m_frames / fps_t.GetElapsedTimeInSec()));
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@ private:
|
|||||||
std::shared_ptr<gui_settings> m_gui_settings;
|
std::shared_ptr<gui_settings> m_gui_settings;
|
||||||
|
|
||||||
u64 m_frames = 0;
|
u64 m_frames = 0;
|
||||||
|
// display status of last title update
|
||||||
|
bool m_show_fps_in_title = false;
|
||||||
QString m_windowTitle;
|
QString m_windowTitle;
|
||||||
bool m_disable_mouse;
|
bool m_disable_mouse;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user