mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
rsx/gui: Delay game window pop-up until first frame
This commit is contained in:
parent
00ff53499a
commit
79513f06a4
@ -25,14 +25,6 @@ GSRender::~GSRender()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSRender::on_init_rsx()
|
|
||||||
{
|
|
||||||
if (m_frame)
|
|
||||||
{
|
|
||||||
m_frame->show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GSRender::on_init_thread()
|
void GSRender::on_init_thread()
|
||||||
{
|
{
|
||||||
if (m_frame)
|
if (m_frame)
|
||||||
|
@ -26,7 +26,6 @@ public:
|
|||||||
GSRender();
|
GSRender();
|
||||||
~GSRender() override;
|
~GSRender() override;
|
||||||
|
|
||||||
void on_init_rsx() override;
|
|
||||||
void on_init_thread() override;
|
void on_init_thread() override;
|
||||||
void on_exit() override;
|
void on_exit() override;
|
||||||
|
|
||||||
|
@ -2039,7 +2039,6 @@ namespace rsx
|
|||||||
|
|
||||||
std::memset(display_buffers, 0, sizeof(display_buffers));
|
std::memset(display_buffers, 0, sizeof(display_buffers));
|
||||||
|
|
||||||
on_init_rsx();
|
|
||||||
m_rsx_thread_exiting = false;
|
m_rsx_thread_exiting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -809,7 +809,6 @@ namespace rsx
|
|||||||
virtual void end();
|
virtual void end();
|
||||||
virtual void execute_nop_draw();
|
virtual void execute_nop_draw();
|
||||||
|
|
||||||
virtual void on_init_rsx() = 0;
|
|
||||||
virtual void on_init_thread() = 0;
|
virtual void on_init_thread() = 0;
|
||||||
virtual void on_frame_end(u32 buffer, bool forced = false);
|
virtual void on_frame_end(u32 buffer, bool forced = false);
|
||||||
virtual void flip(const display_flip_info_t& info) = 0;
|
virtual void flip(const display_flip_info_t& info) = 0;
|
||||||
|
@ -301,7 +301,7 @@ bool gs_frame::shown()
|
|||||||
|
|
||||||
void gs_frame::hide()
|
void gs_frame::hide()
|
||||||
{
|
{
|
||||||
Emu.CallAfter([this]() {QWindow::hide(); });
|
Emu.CallAfter([this]() { QWindow::hide(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void gs_frame::show()
|
void gs_frame::show()
|
||||||
@ -399,6 +399,14 @@ void gs_frame::flip(draw_context_t, bool /*skip_frame*/)
|
|||||||
{
|
{
|
||||||
static Timer fps_t;
|
static Timer fps_t;
|
||||||
|
|
||||||
|
if (!m_flip_showed_frame)
|
||||||
|
{
|
||||||
|
// Show on first flip
|
||||||
|
m_flip_showed_frame = true;
|
||||||
|
show();
|
||||||
|
fps_t.Start();
|
||||||
|
}
|
||||||
|
|
||||||
++m_frames;
|
++m_frames;
|
||||||
|
|
||||||
if (fps_t.GetElapsedTimeInSec() >= 0.5)
|
if (fps_t.GetElapsedTimeInSec() >= 0.5)
|
||||||
|
@ -45,6 +45,7 @@ private:
|
|||||||
bool m_show_mouse_in_fullscreen = false;
|
bool m_show_mouse_in_fullscreen = false;
|
||||||
bool m_hide_mouse_after_idletime = false;
|
bool m_hide_mouse_after_idletime = false;
|
||||||
u32 m_hide_mouse_idletime = 2000; // ms
|
u32 m_hide_mouse_idletime = 2000; // ms
|
||||||
|
bool m_flip_showed_frame = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
gs_frame(const QRect& geometry, const QIcon& appIcon, const std::shared_ptr<gui_settings>& gui_settings);
|
gs_frame(const QRect& geometry, const QIcon& appIcon, const std::shared_ptr<gui_settings>& gui_settings);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user