summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-07-26 23:11:02 +1000
committer Vas Crabb <vas@vastheman.com>2018-07-26 23:11:02 +1000
commit9db24aa2e965d8469d000a7429679fd06c048406 (patch)
treef8169c24d45cd0a51880a0c08830482af1755af1 /src/frontend/mame/ui
parent884f3a86bb57652c4306a852a6f8560cc746b1ce (diff)
Better support for screen orientation/geometry:
* Eliminates the need for the horizontal/vertical/LCD/SVG layout files * Screens can now have orientation and physical aspect ratio specified * RASTER/VECTOR defaults to 4:3, LCD/SVG defaults to square pixels at config time * System orientation is applied on top of screen orientation Automatically generated single-screen views and orientation flags in XML output now work correctly for systems with multiple screens in different geometries/orientations, e.g. housemnq, rocnms, stepstag, or netmerc. The "core rotation options" only interact with system orientation. Allowing multi-screen systems to work well with one monitor per emulated screen is a complex topic. System orientation also affects the GFX viewer while screen orientation doesn't. The orientation displayed in the system selection menu is from the system orientation. Let me know if I've broken any systems or use cases. Also, add save state support for std::array/C array nested to any depth.
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r--src/frontend/mame/ui/devopt.cpp5
-rw-r--r--src/frontend/mame/ui/info.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp
index 562bcc26e2c..2c1ddd9aebd 100644
--- a/src/frontend/mame/ui/devopt.cpp
+++ b/src/frontend/mame/ui/devopt.cpp
@@ -32,6 +32,9 @@ void menu_device_config::populate(float &customtop, float &custombottom)
machine_config &mconfig(const_cast<machine_config &>(machine().config()));
machine_config::token const tok(mconfig.begin_configuration(mconfig.root_device()));
device_t *const dev = mconfig.device_add(m_option->name(), m_option->devtype(), 0);
+ for (device_t &d : device_iterator(*dev))
+ if (!d.configured())
+ d.config_complete();
std::ostringstream str;
util::stream_format(
@@ -96,7 +99,7 @@ void menu_device_config::populate(float &customtop, float &custombottom)
util::stream_format(
str,
- (machine().system().flags & ORIENTATION_SWAP_XY)
+ (screen.orientation() & ORIENTATION_SWAP_XY)
? _(" Screen '%1$s': %2$d \xC3\x97 %3$d (V) %4$f\xC2\xA0Hz\n")
: _(" Screen '%1$s': %2$d \xC3\x97 %3$d (H) %4$f\xC2\xA0Hz\n"),
screen.tag(),
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp
index fde44227ea3..4a39bc050f5 100644
--- a/src/frontend/mame/ui/info.cpp
+++ b/src/frontend/mame/ui/info.cpp
@@ -385,7 +385,7 @@ std::string machine_info::game_info_string() const
const rectangle &visarea = screen.visible_area();
detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz",
visarea.width(), visarea.height(),
- (m_machine.system().flags & ORIENTATION_SWAP_XY) ? "V" : "H",
+ (screen.orientation() & ORIENTATION_SWAP_XY) ? "V" : "H",
ATTOSECONDS_TO_HZ(screen.frame_period().attoseconds()));
}