summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/util/zippath.cpp2
-rw-r--r--src/osd/modules/osdwindow.cpp21
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_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