diff options
author | 2017-07-27 09:56:53 +1000 | |
---|---|---|
committer | 2017-07-27 09:56:53 +1000 | |
commit | 22d80b35290491e041122708b0482826ba3a89c9 (patch) | |
tree | f9b39d9aa70ab6573c2f5559b6ef06be27512e51 /src/emu/render.cpp | |
parent | 6cf16fde31232e3081a7ec2d2db9bcece9f8b95d (diff) |
Move unemulated/imperfect flags from machines into devices.
Right now, flags for unemulated/imperfect features apply at system
level. This falls over quickly with systems that have slot devices.
For example you can plug in a broken sound card or keyboard on a PC or
Amiga driver and get no warnings. There's also no way to propagate
these flags from a device to all systems using it.
This changeset addresses these issues. It's now possible to report
unemulated/imperfect features on a device level with static
unemulated_feeatures() and imperfect_features() member functions. So
far the only thing using this is the votrax device.
To support front-ends, this is exposed in -listxml output as a new
"feature" element that can appear in system/device descriptions. It has
a "type" attribute indicating which feature it is, potentially a
"status" attribute if the device itself declares that the feature is
unemulated/imperfect, and potentially an "overall" attribute if the
device inherits a more severe indication from a subdevice. The embedded
DTD describes possible values.
Example: device/machine declares imperfect sound:
<feature type="sound" status="imperfect"/>
Example: device/machine declares unemulated keyboard:
<feature type="keyboard" status="unemulated"/>
Example: device declares imperfect controls but inherits unemulated
controls from a subdevice:
<feature type="controls" status="imperfect" overall="unemulated"/>
Example: device doesn't declare imperfect LAN but inherits it from a
subdevice:
<feature type="lan" overall="imperfect"/>
It's still possible to add these flags to machines in the GAME/COMP/CONS
macro. If the state class declares them with static member functions,
the two sources will be combined.
If you subclass a device, you inherit its flags if you don't redefine
the relevant static member functions (no override qualifier is necessary
since they're static).
The UI has been updated to display appropriate warnings for the overall
machine configuration, including selected slot devices, at launch time.
The menus don't display overall status, only status for the machine
itself. We can make it scan subdevices if we decide that's desirable,
it just needs caching to enure we don't take a huge performance hit.
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r-- | src/emu/render.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 29fd2e42a63..4531b2adc32 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -575,7 +575,7 @@ render_container::render_container(render_manager &manager, screen_device *scree if (m_screen != nullptr) { // set the initial orientation and brightness/contrast/gamma - m_user.m_orientation = manager.machine().system().flags & ORIENTATION_MASK; + m_user.m_orientation = manager.machine().system().flags & machine_flags::MASK_ORIENTATION; m_user.m_brightness = manager.machine().options().brightness(); m_user.m_contrast = manager.machine().options().contrast(); m_user.m_gamma = manager.machine().options().gamma(); @@ -948,7 +948,7 @@ render_target::render_target(render_manager &manager, const internal_layout *lay // determine the base orientation based on options if (!manager.machine().options().rotate()) - m_base_orientation = orientation_reverse(manager.machine().system().flags & ORIENTATION_MASK); + m_base_orientation = orientation_reverse(manager.machine().system().flags & machine_flags::MASK_ORIENTATION); // rotate left/right if (manager.machine().options().ror() || (manager.machine().options().auto_ror() && (manager.machine().system().flags & ORIENTATION_SWAP_XY))) |