ares-openbsd/desktop-ui/settings
jcm 67fc9ea81b
ruby: Various Mac driver settings fix-ups (#1486)
This PR applies several minor fixes and improvements to macOS driver
settings and the driver settings pane.

#### Remove the "exclusive mode" video option on macOS.

* There is no real notion of exclusive presentation on macOS beyond what
already exists in normal fullscreen. If an application is covering the
screen and no other application or window is visible, the system
automatically switches to a "direct" presentation mode that optimizes
for single-application presentation performance. There is not a good
reason to show this option on macOS, even disabled.
* By contrast, it is possible (though not implemented by ares) to enter
exclusive mode on the audio device with CoreAudio, so leave that option
there, just disabled.
#### Add a "use native fullscreen" option on macOS.
* There are various good reasons to prefer either native platform
fullscreen behavior, or a custom borderless windowed fullscreen. Rather
than guess what the user wants, offer an option.
* If unchecked, make the window title bar enlarge the window rather than
fullscreen it, so we don't mix behaviors.
#### Implement fullscreen monitor selection behavior for Metal, and
correctly enumerate the user's monitor names.
* Fullscreen display on the selected monitor in the settings pane was
previously not implemented on macOS. This implementation only works if
"Use native fullscreen" is disabled, since the macOS fullscreen idiom
doesn't feature selecting a specific display.
* Additionally, the old function to retrieve the monitor's localized
name did not work reliably on newer macOS versions. Use the modern
property `localizedName` on NSScreen for macOS versions above 10.15, and
fall back to the old implementation otherwise.
* Implementing this meant adding a `uintptr` handle to the NSScreen
instance in the `Monitor` struct in ruby that uses a bridged cast to
interface with Objective-C. I would have preferred not to do this, but I
didn't see another good way to handle getting the `NSScreen` instance
that didn't involve a serious refactor.
#### (all platforms) Disable monitor selection if the video driver's
`hasMonitor()` is false.
* Just a minor fixup; the existing behavior is that the dropdown list
can be navigated and selected, but the selection does not persist. It
makes more sense to just disable it if the driver doesn't support it.

Co-authored-by: jcm <butt@butts.com>
2024-05-05 16:11:35 +01:00
..
audio.cpp
debug.cpp GDB Server (#1223) 2023-09-17 16:19:13 +01:00
drivers.cpp ruby: Various Mac driver settings fix-ups (#1486) 2024-05-05 16:11:35 +01:00
emulators.cpp
firmware.cpp desktop-ui: Fix broken firmware path setting. (#1374) 2024-01-22 14:20:27 +00:00
home.cpp
hotkeys.cpp
input.cpp
options.cpp Enable/Disable N64 Expansion Pak (#1302) 2023-11-29 21:43:20 +00:00
paths.cpp nall: Account for macOS app bundles in program path. (#1373) 2024-01-22 14:20:14 +00:00
settings.cpp ruby: Various Mac driver settings fix-ups (#1486) 2024-05-05 16:11:35 +01:00
settings.hpp ruby: Various Mac driver settings fix-ups (#1486) 2024-05-05 16:11:35 +01:00
video.cpp ares: border and overscan overhaul 2024-01-28 15:38:47 +00:00