mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-25 18:46:55 +01:00
Vulkan: Check for 0 size before wayland resize
Fixes "Launching games directly with the --title-id argument doesn't work in Wayland" (#999)
This commit is contained in:
parent
7e778042ee
commit
f899ab7c34
@ -66,6 +66,10 @@ void VulkanCanvas::OnPaint(wxPaintEvent& event)
|
|||||||
|
|
||||||
void VulkanCanvas::OnResize(wxSizeEvent& event)
|
void VulkanCanvas::OnResize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
|
const wxSize size = GetSize();
|
||||||
|
if (size.GetWidth() == 0 || size.GetHeight() == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
#if BOOST_OS_LINUX && HAS_WAYLAND
|
#if BOOST_OS_LINUX && HAS_WAYLAND
|
||||||
if(m_subsurface)
|
if(m_subsurface)
|
||||||
{
|
{
|
||||||
@ -73,9 +77,6 @@ void VulkanCanvas::OnResize(wxSizeEvent& event)
|
|||||||
m_subsurface->setSize(sRect.GetX(), sRect.GetY(), sRect.GetWidth(), sRect.GetHeight());
|
m_subsurface->setSize(sRect.GetX(), sRect.GetY(), sRect.GetWidth(), sRect.GetHeight());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const wxSize size = GetSize();
|
|
||||||
if (size.GetWidth() == 0 || size.GetHeight() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
const wxRect refreshRect(size);
|
const wxRect refreshRect(size);
|
||||||
RefreshRect(refreshRect, false);
|
RefreshRect(refreshRect, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user