mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 03:16:58 +00:00
Fix initial crash on Mac OS X version when there isn't .asepriterc file and our desktop resolution is 1024x768
Now, a set_gfx_mode() (in Mac OS X) can accept almost any resolution, the screen will be created with the NSView bounds anyway (which can be smaller than the given size in set_gfx_mode()).
This commit is contained in:
parent
3760525a61
commit
354d945b49
@ -535,6 +535,8 @@ static BITMAP *private_osx_qz_window_init(int w, int h, int v_w, int v_h, int co
|
||||
|
||||
setup_direct_shifts();
|
||||
|
||||
w = [qd_view bounds].size.width;
|
||||
h = [qd_view bounds].size.height;
|
||||
private_osx_create_screen_data(w, h, color_depth);
|
||||
|
||||
requested_color_depth = color_depth;
|
||||
@ -826,6 +828,8 @@ static BITMAP* osx_qz_window_acknowledge_resize(void)
|
||||
[qd_view setFrameSize: NSMakeSize(w, h)];
|
||||
|
||||
/* re-create the screen */
|
||||
w = [qd_view bounds].size.width;
|
||||
h = [qd_view bounds].size.height;
|
||||
new_screen = private_osx_create_screen_data(w, h, color_depth);
|
||||
|
||||
_unix_unlock_mutex(osx_window_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user