Repository navigation
Conversation
…ixed offsets A recording made on a Duo (both displays, both portraits, lying on its side) showed that the motion sensors are laid out like any iPhone's on the outer display, and turned a quarter turn in the plane of the screen on the inner display (held in landscape, gravity runs along y). The Duo code read the screen's horizontal axis from gravity instead, which only worked by accident: lying on its side, gravity points along the screen's side while the game stays in landscape, and every back tap came out as the same portal. Back taps and gyro aiming no longer read gravity to find the screen's axes. The interface orientation says which device axis is horizontal, as on any iPhone, and on the inner display (rt_ios_scene_wide_display) the samples are first turned back into the outer display's frame (rt_backtap_set_turn, rt_gyro_params.turn), in every orientation. Replaying the recordings: every pose (outer display upright and lying on either side, inner display in both landscapes and in portrait) gives alternating groups of left and right taps. - raw recordings log display changes (w lines); tools/backtap_replay.c replays them. - tests for the turned frame, portrait and lying on a side; docs.
The landscape-only geometry request made at a launch on the outer display
is a setting of the scene, not a one-off: after unfolding, the inner
display could not rotate to portrait. Ask again for each display
(landscape, or landscape and portrait on the inner display) whenever the
display changes.
Upside-down portrait is not available: iOS refuses it on this phone even
when the view controller allows it ("None of the requested orientations
are supported by the view controller. Requested: portraitUpsideDown;
Supported: portrait, landscapeLeft, landscapeRight"). Documented.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #54. Two fixes for the Duo's inner display.
Back taps lying on the side. The Duo still read gravity to find the screen's axes, so lying on its side every tap fired the same portal. A recording shows the outer display's sensors are laid out like any iPhone's, and the inner display's are turned a quarter turn in the screen plane. Back taps and gyro aiming now use the interface orientation, as on any iPhone, and turn the inner display's samples back into the outer display's frame (
rt_backtap_set_turn,rt_gyro_params.turn). Raw recordings log display changes (wlines) andtools/backtap_replay.creplays them.Rotation. After a launch on the outer display, the inner display could not rotate to portrait: the landscape-only request made at launch is a scene setting, so it outlived the unfold. It is now made again on each display change.
Tested:
make check, UBSan, Python 3.9. On an iPhone Duo: rotation after a folded launch (twice), back taps on the expected side in every pose (both displays, upright and lying on either side, both landscapes, portrait), gyro aiming in every orientation.Not available: upside-down portrait. iOS refuses it on this phone even when the view controller allows it. Not tested: half-open pose, other iPhones and iPads (their path is unchanged).