summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/render.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-12-20 15:28:27 +1100
committer Vas Crabb <vas@vastheman.com>2020-12-20 15:28:27 +1100
commited872d1bd2a8c50086c1fe4f97420a065f249eb1 (patch)
tree2f1edc26b22ac9f9e30bd218600161d9529e6b69 /src/emu/render.cpp
parent25294ce9cdd4dde807f931fc2e28046db3b4ad39 (diff)
Fix some oversights and emergent behaviour with view selection.
Exposed the "native snapview" option on the video manager. Trying to use presence of a single view is a poor proxy that breaks with multi-screen systems. Allow rotation to be changed for native snapshot views, and disable the zoom to screen area control when it has no effect on the selected view. Treat an empty string identically to "auto" for view selectction. Previously this was being used for prefix matching so it would force the first view. (This caused the bad snapshot view selection. It had been relying on "internal" not being a common view name prefix so it fell through to automatic selection, but when changed to an empty string it forced the first view.) Documented "auto" as well as "native" for the -snapview option and changed the default to auto rather than an empty string for consistency with the -viewN options. Added [w]string_view handlers to the stuff that's instantiated in strformat.cpp since we'll be increasingly using them. Cleaned up and updated some documentation.
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r--src/emu/render.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index 6b9a1e76f18..68c840f89a6 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -1061,8 +1061,8 @@ unsigned render_target::configured_view(const char *viewname, int targetindex, i
{
layout_view *view = nullptr;
- // auto view just selects the nth view
- if (strcmp(viewname, "auto") != 0)
+ // if it isn't "auto" or an empty string, try to match it as a view name prefix
+ if (viewname && *viewname && strcmp(viewname, "auto"))
{
// scan for a matching view name
size_t const viewlen = strlen(viewname);
@@ -3315,7 +3315,7 @@ void render_manager::config_load(config_type cfg_type, util::xml::data_node cons
for (util::xml::data_node const *targetnode = parentnode->get_child("target"); targetnode; targetnode = targetnode->get_next_sibling("target"))
{
render_target *const target = target_by_index(targetnode->get_attribute_int("index", -1));
- if (target)
+ if (target && !target->hidden())
target->config_load(*targetnode);
}