ui: hide dirs on iOS. Fix home on android. force even width rendering

Hide content and home dirs on iOS
Show home dir and allow change on android
Force even width for rendering resolution
This commit is contained in:
Flyinghead 2021-08-26 10:08:50 +02:00
parent 4bf20846bc
commit 2a849ccba5
2 changed files with 16 additions and 9 deletions

View File

@ -658,25 +658,29 @@ void dc_resize_renderer()
{
if (renderer == nullptr)
return;
int hres;
float hres;
int vres = config::RenderResolution;
if (config::Widescreen && !config::Rotate90)
{
if (config::SuperWidescreen)
hres = config::RenderResolution * screen_width / screen_height ;
hres = (float)config::RenderResolution * screen_width / screen_height ;
else
hres = config::RenderResolution * 16 / 9;
hres = config::RenderResolution * 16.f / 9.f;
}
else if (config::Rotate90)
{
vres = vres * config::ScreenStretching / 100;
hres = config::RenderResolution * 4 / 3;
hres = config::RenderResolution * 4.f / 3.f;
}
else
{
hres = config::RenderResolution * 4 * config::ScreenStretching / 3 / 100;
hres = config::RenderResolution * 4.f * config::ScreenStretching / 3.f / 100.f;
}
renderer->Resize(hres, vres);
if (!config::Rotate90)
hres = std::roundf(hres / 2.f) * 2.f;
DEBUG_LOG(RENDERER, "dc_resize_renderer: %d x %d", (int)hres, vres);
renderer->Resize((int)hres, vres);
}
void dc_resume()

View File

@ -1094,6 +1094,7 @@ static void gui_display_settings()
ImGui::SameLine();
ShowHelpMarker("Video connection type");
#if !defined(TARGET_IPHONE)
ImVec2 size;
size.x = 0.0f;
size.y = (ImGui::GetTextLineHeightWithSpacing() + ImGui::GetStyle().FramePadding.y * 2.f)
@ -1138,7 +1139,7 @@ static void gui_display_settings()
ImGui::SameLine();
ShowHelpMarker("The directories where your games are stored");
#ifdef __linux__
#if defined(__linux__) && !defined(__ANDROID__)
if (ImGui::ListBoxHeader("Data Directory", 1))
{
ImGui::AlignTextToFramePadding();
@ -1147,7 +1148,7 @@ static void gui_display_settings()
}
ImGui::SameLine();
ShowHelpMarker("The directory containing BIOS files, as well as saved VMUs and states");
#elif !defined(TARGET_IPHONE)
#else
if (ImGui::ListBoxHeader("Home Directory", 1))
{
ImGui::AlignTextToFramePadding();
@ -1161,7 +1162,9 @@ static void gui_display_settings()
}
ImGui::SameLine();
ShowHelpMarker("The directory where Flycast saves configuration files and VMUs. BIOS files should be in a subfolder named \"data\"");
#endif
#endif // !linux
#endif // !TARGET_IPHONE
if (OptionCheckbox("Hide Legacy Naomi Roms", config::HideLegacyNaomiRoms,
"Hide .bin, .dat and .lst files from the content browser"))
scanner.refresh();