forked from ares-emulator/ares
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruby: Various Mac driver settings fix-ups (ares-emulator#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 <[email protected]>
- Loading branch information
Showing
7 changed files
with
97 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters