mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-15 19:52:05 +00:00
Fix #344 initial black screen on Mac OS X and small initial window size on Linux when .asepriterc is not present
This commit is contained in:
parent
44c6f9400e
commit
daa7adde14
@ -153,19 +153,22 @@ static void save_gui_config();
|
||||
// Initializes GUI.
|
||||
int init_module_gui()
|
||||
{
|
||||
int c, w, h, min_possible_dsk_res = 0;
|
||||
bool maximized;
|
||||
|
||||
shortcuts = new std::vector<Shortcut*>;
|
||||
|
||||
// Set the graphics mode...
|
||||
int w, h;
|
||||
bool maximized;
|
||||
load_gui_config(w, h, maximized);
|
||||
|
||||
try {
|
||||
main_display = she::instance()->createDisplay(w, h, screen_scaling);
|
||||
if (w > 0 && h > 0)
|
||||
main_display = she::instance()->createDisplay(w, h, screen_scaling);
|
||||
}
|
||||
catch (const she::DisplayCreationException&) {
|
||||
for (c=min_possible_dsk_res; try_resolutions[c].width; ++c) {
|
||||
// Do nothing, the display wasn't created.
|
||||
}
|
||||
|
||||
if (!main_display) {
|
||||
for (int c=0; try_resolutions[c].width; ++c) {
|
||||
try {
|
||||
main_display =
|
||||
she::instance()->createDisplay(try_resolutions[c].width,
|
||||
|
@ -679,6 +679,7 @@ public:
|
||||
}
|
||||
|
||||
Display* createDisplay(int width, int height, int scale) override {
|
||||
PRINTF("Creating display %dx%d (scale = %d)\n", width, height, scale);
|
||||
return new Alleg4Display(width, height, scale);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user