mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-10-31 19:36:16 +00:00
fixed GL settings in Android
This commit is contained in:
parent
63570af240
commit
0283eaa252
@ -1169,6 +1169,12 @@ EX pair<int, int> get_requested_resolution() {
|
|||||||
|
|
||||||
EX bool resizable = true;
|
EX bool resizable = true;
|
||||||
|
|
||||||
|
EX void setvideomode_android() {
|
||||||
|
vid.usingGL = vid.wantGL;
|
||||||
|
vid.full = vid.want_fullscreen;
|
||||||
|
vid.antialias = vid.want_antialias;
|
||||||
|
}
|
||||||
|
|
||||||
#if CAP_SDL
|
#if CAP_SDL
|
||||||
|
|
||||||
EX int current_window_flags = -1;
|
EX int current_window_flags = -1;
|
||||||
@ -1355,7 +1361,6 @@ EX void init_graph() {
|
|||||||
printf("Failed to initialize video.\n");
|
printf("Failed to initialize video.\n");
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
graphics_on = true;
|
|
||||||
|
|
||||||
#if ISWEB
|
#if ISWEB
|
||||||
get_canvas_size();
|
get_canvas_size();
|
||||||
@ -1379,6 +1384,12 @@ EX void init_graph() {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
graphics_on = true;
|
||||||
|
|
||||||
|
#if ISANDROID
|
||||||
|
setvideomode_android();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CAP_SDL
|
#if CAP_SDL
|
||||||
setvideomode();
|
setvideomode();
|
||||||
if(!s) {
|
if(!s) {
|
||||||
|
@ -1545,6 +1545,7 @@ EX void showGraphConfig() {
|
|||||||
#if !ISIOS && !ISWEB
|
#if !ISIOS && !ISWEB
|
||||||
add_edit(vid.want_fullscreen);
|
add_edit(vid.want_fullscreen);
|
||||||
|
|
||||||
|
#if !ISANDROID && !ISFAKEMOBILE
|
||||||
if(vid.want_fullscreen) {
|
if(vid.want_fullscreen) {
|
||||||
add_edit(vid.change_fullscr);
|
add_edit(vid.change_fullscr);
|
||||||
if(vid.change_fullscr)
|
if(vid.change_fullscr)
|
||||||
@ -1559,12 +1560,14 @@ EX void showGraphConfig() {
|
|||||||
else
|
else
|
||||||
add_edit(vid.window_x), add_edit(vid.window_y);
|
add_edit(vid.window_x), add_edit(vid.window_y);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CAP_GLORNOT
|
#if CAP_GLORNOT
|
||||||
add_edit(vid.wantGL);
|
add_edit(vid.wantGL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !ISIOS && !ISANDROID && !ISFAKEMOBILE
|
||||||
if(!vid.usingGL) {
|
if(!vid.usingGL) {
|
||||||
dialog::addBoolItem(XLAT("anti-aliasing"), vid.want_antialias & AA_NOGL, 'O');
|
dialog::addBoolItem(XLAT("anti-aliasing"), vid.want_antialias & AA_NOGL, 'O');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
@ -1589,7 +1592,9 @@ EX void showGraphConfig() {
|
|||||||
vid.want_antialias |= AA_LINES;
|
vid.want_antialias |= AA_LINES;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !ISIOS && !ISANDROID && !ISFAKEMOBILE
|
||||||
if(vid.usingGL) {
|
if(vid.usingGL) {
|
||||||
if(vrhr::active())
|
if(vrhr::active())
|
||||||
dialog::addInfo(XLAT("(vsync disabled in VR)"));
|
dialog::addInfo(XLAT("(vsync disabled in VR)"));
|
||||||
@ -1598,6 +1603,7 @@ EX void showGraphConfig() {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(need_to_apply_screen_settings()) {
|
if(need_to_apply_screen_settings()) {
|
||||||
dialog::addItem(XLAT("apply changes"), 'A');
|
dialog::addItem(XLAT("apply changes"), 'A');
|
||||||
|
Loading…
Reference in New Issue
Block a user