mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 18:32:50 +00:00
Fix problem initializing SkiaDisplay with an invalid surface size on OS X
This problem happened when Aseprite is run for the very first time on OS X (i.e. without an aseprite.ini file in the user configuration directory), as the final size of the created window might be different (smaller) than the given width/height parameters in the SkiaDisplay constructor.
This commit is contained in:
parent
61a933bee2
commit
fda9abce33
@ -24,11 +24,11 @@ SkiaDisplay::SkiaDisplay(int width, int height, int scale)
|
|||||||
, m_customSurface(false)
|
, m_customSurface(false)
|
||||||
, m_nativeCursor(kArrowCursor)
|
, m_nativeCursor(kArrowCursor)
|
||||||
{
|
{
|
||||||
m_surface->create(width / scale,
|
|
||||||
height / scale);
|
|
||||||
m_window.setScale(scale);
|
m_window.setScale(scale);
|
||||||
m_window.setVisible(true);
|
m_window.setVisible(true);
|
||||||
|
|
||||||
|
resetSkiaSurface();
|
||||||
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user