summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-09-06 01:41:44 +1000
committer Vas Crabb <vas@vastheman.com>2020-09-06 01:41:44 +1000
commit94601c77cc5b645a7738d634fb6e668dfd98d6db (patch)
treefeaddeac4cbb07e66f29cd3fd08c508a2a10339a /src/osd/windows
parent080826aac441562e168fbd82eaa6bc27d2bd19a2 (diff)
-util/xmlfile: Escape attribute and element content.
The previous behaviour was unintuitive - parsing an XML file and writing it out immediately would produce invalid XML if the file contained any characters that needed escaping. It makes far more sense to escape on writing rather than expecting the user to escape input. -Add preliminary support for visibility toggles to artwork system. This allows the user to show/hide related elements in a view, with nesting. The view can specify whether elements are shown or hidden by default. Settings are saved per host window/screen per view. There is no way to set the initial visibility state on the command line. Legacy "Space Invaders cabinet model" layers are mapped onto visibility toggles. This is not stable yet. In particular, the XML element/attribute names have not been finalised. The new features have not been added to complay.py to prevent them from being used before they're finalised.
Diffstat (limited to 'src/osd/windows')
-rw-r--r--src/osd/windows/window.cpp15
-rw-r--r--src/osd/windows/window.h3
2 files changed, 10 insertions, 8 deletions
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index 8e6d3665e82..ac4349cf36b 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -312,6 +312,7 @@ win_window_info::win_window_info(
m_target(nullptr),
m_targetview(0),
m_targetorient(0),
+ m_targetvismask(0),
m_lastclicktime(std::chrono::system_clock::time_point::min()),
m_lastclickx(0),
m_lastclicky(0),
@@ -790,6 +791,7 @@ void win_window_info::create(running_machine &machine, int index, std::shared_pt
window->m_targetview = window->m_target->view();
window->m_targetorient = window->m_target->orientation();
window->m_targetlayerconfig = window->m_target->layer_config();
+ window->m_targetvismask = window->m_target->visibility_mask();
// make the window title
if (video_config.numscreens == 1)
@@ -859,20 +861,19 @@ void win_window_info::destroy()
void win_window_info::update()
{
- int targetview, targetorient;
- render_layer_config targetlayerconfig;
-
assert(GetCurrentThreadId() == main_threadid);
// see if the target has changed significantly in window mode
- targetview = m_target->view();
- targetorient = m_target->orientation();
- targetlayerconfig = m_target->layer_config();
- if (targetview != m_targetview || targetorient != m_targetorient || targetlayerconfig != m_targetlayerconfig)
+ unsigned const targetview = m_target->view();
+ int const targetorient = m_target->orientation();
+ render_layer_config const targetlayerconfig = m_target->layer_config();
+ u32 const targetvismask = m_target->visibility_mask();
+ if (targetview != m_targetview || targetorient != m_targetorient || targetlayerconfig != m_targetlayerconfig || targetvismask != m_targetvismask)
{
m_targetview = targetview;
m_targetorient = targetorient;
m_targetlayerconfig = targetlayerconfig;
+ m_targetvismask = targetvismask;
// in window mode, reminimize/maximize
if (!fullscreen())
diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h
index b04e35aa110..3dccc520a83 100644
--- a/src/osd/windows/window.h
+++ b/src/osd/windows/window.h
@@ -122,9 +122,10 @@ public:
// rendering info
std::mutex m_render_lock;
render_target * m_target;
- int m_targetview;
+ unsigned m_targetview;
int m_targetorient;
render_layer_config m_targetlayerconfig;
+ u32 m_targetvismask;
// input info
std::chrono::system_clock::time_point m_lastclicktime;