Skip to content

Commit ac7f859

Browse files
SiegeLordExSiegeLord
authored andcommitted
Set the Android's automatic programmable pipeline earlier.
Otherwise, the display isn't created quite correctly.
1 parent 51980ba commit ac7f859

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/android/android_display.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,14 @@ static ALLEGRO_DISPLAY *android_create_display(int w, int h)
510510
display->h = h;
511511
display->flags = flags;
512512

513+
display->flags |= ALLEGRO_OPENGL;
514+
#ifdef ALLEGRO_CFG_OPENGLES2
515+
display->flags |= ALLEGRO_PROGRAMMABLE_PIPELINE;
516+
#endif
517+
#ifdef ALLEGRO_CFG_OPENGLES
518+
display->flags |= ALLEGRO_OPENGL_ES_PROFILE;
519+
#endif
520+
513521
_al_event_source_init(&display->es);
514522

515523
/* Java thread needs this but it's thread local.
@@ -551,14 +559,6 @@ static ALLEGRO_DISPLAY *android_create_display(int w, int h)
551559
return NULL;
552560
}
553561

554-
display->flags |= ALLEGRO_OPENGL;
555-
#ifdef ALLEGRO_CFG_OPENGLES2
556-
display->flags |= ALLEGRO_PROGRAMMABLE_PIPELINE;
557-
#endif
558-
#ifdef ALLEGRO_CFG_OPENGLES
559-
display->flags |= ALLEGRO_OPENGL_ES_PROFILE;
560-
#endif
561-
562562
ALLEGRO_DEBUG("display: %p %ix%i", display, display->w, display->h);
563563

564564
_al_android_clear_current(_al_android_get_jnienv(), d);

0 commit comments

Comments
 (0)