diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 62490181fb..e66575955e 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -643,12 +643,6 @@ struct GameOptionsWindow : Window { case WID_GO_GUI_ZOOM_DROPDOWN: GfxClearSpriteCache(); _gui_zoom = (ZoomLevel)(ZOOM_LVL_OUT_4X - index); - switch (_gui_zoom) { - case ZOOM_LVL_OUT_4X - ZOOM_LVL_NORMAL: ChangeResInGame(854, 480); break; - case ZOOM_LVL_OUT_4X - ZOOM_LVL_OUT_2X: ChangeResInGame(1280, 720); break; - case ZOOM_LVL_OUT_4X - ZOOM_LVL_OUT_4X: ChangeResInGame(1920, 1080); break; - default: break; - } UpdateCursorSize(); UpdateAllVirtCoords(); FixTitleGameZoom(); diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini index 1ee03faf00..870c3ae367 100644 --- a/src/table/misc_settings.ini +++ b/src/table/misc_settings.ini @@ -121,7 +121,7 @@ name = ""resolution"" type = SLE_INT length = 2 var = _cur_resolution -def = ""854,480"" +def = ""1,480"" cat = SC_BASIC [SDTG_STR] diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index ed4cd8fe65..a4979d757c 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -251,7 +251,9 @@ static void GetVideoModes() } } _num_resolutions = n; +#if !defined(__ANDROID__) // Android has native screen sizes first, do not sort them SortResolutions(_num_resolutions); +#endif } } @@ -268,8 +270,14 @@ static void GetAvailableVideoMode(uint *w, uint *h) /* Use the closest possible resolution */ int best = 0; uint delta = Delta(_resolutions[0].width, *w) * Delta(_resolutions[0].height, *h); + if (*w <= 1) { + delta = Delta(_resolutions[0].height, *h); + } for (int i = 1; i != _num_resolutions; ++i) { uint newdelta = Delta(_resolutions[i].width, *w) * Delta(_resolutions[i].height, *h); + if (*w <= 1) { + newdelta = Delta(_resolutions[i].height, *h); + } if (newdelta < delta) { best = i; delta = newdelta; diff --git a/todo.txt b/todo.txt index e3d30d364a..0948f2a12e 100644 --- a/todo.txt +++ b/todo.txt @@ -9,5 +9,3 @@ - Create auto-save when the app is put to background, and load it on the next start. -- Select native screen width x 480 resolution on first run. -