From 4fd3a17070096d424100ef97ae1730f4e3e2f3b2 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 8 Jan 2021 04:10:10 +1100 Subject: util/zippath.cpp: Fix suffix for zip archives. --- src/lib/util/zippath.cpp | 2 +- src/osd/modules/osdwindow.cpp | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp index f85a81ed079..4481e84da71 100644 --- a/src/lib/util/zippath.cpp +++ b/src/lib/util/zippath.cpp @@ -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"); } diff --git a/src/osd/modules/osdwindow.cpp b/src/osd/modules/osdwindow.cpp index 9af08aed260..f93e54e691f 100644 --- a/src/osd/modules/osdwindow.cpp +++ b/src/osd/modules/osdwindow.cpp @@ -61,21 +61,12 @@ std::shared_ptr osd_window::monitor_from_rect(const osd_rect * { std::shared_ptr 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 -- cgit v1.2.3