rsx/gui: Delay game window pop-up until first frame

This commit is contained in:
Eladash
2021-01-21 18:16:08 +02:00
committed by kd-11
parent 00ff53499a
commit 79513f06a4
6 changed files with 10 additions and 12 deletions
-8
View File
@@ -25,14 +25,6 @@ GSRender::~GSRender()
}
}
void GSRender::on_init_rsx()
{
if (m_frame)
{
m_frame->show();
}
}
void GSRender::on_init_thread()
{
if (m_frame)
-1
View File
@@ -26,7 +26,6 @@ public:
GSRender();
~GSRender() override;
void on_init_rsx() override;
void on_init_thread() override;
void on_exit() override;
-1
View File
@@ -2039,7 +2039,6 @@ namespace rsx
std::memset(display_buffers, 0, sizeof(display_buffers));
on_init_rsx();
m_rsx_thread_exiting = false;
}
-1
View File
@@ -809,7 +809,6 @@ namespace rsx
virtual void end();
virtual void execute_nop_draw();
virtual void on_init_rsx() = 0;
virtual void on_init_thread() = 0;
virtual void on_frame_end(u32 buffer, bool forced = false);
virtual void flip(const display_flip_info_t& info) = 0;
+9 -1
View File
@@ -301,7 +301,7 @@ bool gs_frame::shown()
void gs_frame::hide()
{
Emu.CallAfter([this]() {QWindow::hide(); });
Emu.CallAfter([this]() { QWindow::hide(); });
}
void gs_frame::show()
@@ -399,6 +399,14 @@ void gs_frame::flip(draw_context_t, bool /*skip_frame*/)
{
static Timer fps_t;
if (!m_flip_showed_frame)
{
// Show on first flip
m_flip_showed_frame = true;
show();
fps_t.Start();
}
++m_frames;
if (fps_t.GetElapsedTimeInSec() >= 0.5)
+1
View File
@@ -45,6 +45,7 @@ private:
bool m_show_mouse_in_fullscreen = false;
bool m_hide_mouse_after_idletime = false;
u32 m_hide_mouse_idletime = 2000; // ms
bool m_flip_showed_frame = false;
public:
gs_frame(const QRect& geometry, const QIcon& appIcon, const std::shared_ptr<gui_settings>& gui_settings);