util/zippath.cpp: Fix suffix for zip archives.

This commit is contained in:
Vas Crabb 2021-01-08 04:10:10 +11:00
parent ded9173f78
commit 4fd3a17070
2 changed files with 7 additions and 16 deletions

View File

@ -78,7 +78,7 @@ bool is_7z_file(std::string const &path)
bool is_zip_file(std::string const &path)
{
return core_filename_ends_with(path, ".7zip");
return core_filename_ends_with(path, ".zip");
}

View File

@ -61,21 +61,12 @@ std::shared_ptr<osd_monitor_info> osd_window::monitor_from_rect(const osd_rect *
{
std::shared_ptr<osd_monitor_info> monitor;
// in window mode, find the nearest
if (!fullscreen() && m_monitor != nullptr)
{
if (proposed != nullptr)
{
monitor = m_monitor->module().monitor_from_rect(*proposed);
}
else
monitor = m_monitor->module().monitor_from_window(*this);
}
else
{
// in full screen, just use the configured monitor
if (fullscreen() || !m_monitor) // in full screen, just use the configured monitor
monitor = m_monitor;
}
else if (proposed) // in window mode, find the nearest
monitor = m_monitor->module().monitor_from_rect(*proposed);
else
monitor = m_monitor->module().monitor_from_window(*this);
return monitor;
}
@ -96,7 +87,7 @@ void osd_window::create_target()
void osd_window::set_starting_view(int index, const char *defview, const char *view)
{
// choose non-auto over auto
if (strcmp(view, "auto") == 0 && strcmp(defview, "auto") != 0)
if ((!*view || !strcmp(view, "auto")) && (*defview && strcmp(defview, "auto")))
view = defview;
// query the video system to help us pick a view