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:
David Capello 2016-05-17 12:19:53 -03:00
parent 61a933bee2
commit fda9abce33

View File

@ -24,11 +24,11 @@ SkiaDisplay::SkiaDisplay(int width, int height, int scale)
, m_customSurface(false)
, m_nativeCursor(kArrowCursor)
{
m_surface->create(width / scale,
height / scale);
m_window.setScale(scale);
m_window.setVisible(true);
resetSkiaSurface();
m_initialized = true;
}