KEMBAR78
Update frame on safe insets changes and update Info.plist with export compliance by larsamannen · Pull Request #4989 · scummvm/scummvm · GitHub
Skip to content

Conversation

@larsamannen
Copy link
Contributor

This PR contains 2 commits.
The first one fixes inaccurate touches which was discovered on devices where the frame had to be resized to comply with the safeArea of the screen.

The second commit adds the ITSAppUsesNonExemptEncryption to the Info.plist so we don't have to answer about export compliance every time a new build is submitted.

There is a race condition when iOS updates the safe insets and
the view is updated on orientation changes. When rotating the
device the callback function interfaceOrientationChanged is
called. This triggers rebuildSurface to be called, which will
call updateOutputSurface, which will trigger initSurface. That
function will finally will adjust the main frame towards the
safe areas by calling the function adjustViewFrameForSafeArea.

But it seems that when adjustViewFrameForSafeArea is called the
safe insets values are not updated which will lead to wrong
offset values in the frame for touches which will make the mouse
pointer inaccurate.

The iOS system makes calls to safeAreaInsetsDidChange whenever
the safe insets values are updated. Make sure to update the frame
on these calls to get correct touch offsets.
Every time ScummVM iOS application is submitted to TestFlight or the
App Store, App Store Connect asks a question about the application's
export compliance. To not have to answer that question on every
upload, set the property ITSAppUsesNonExemptEncryption in Info.plist
to NO.

ScummVM uses third-party libraries that utilizes encryption, however
these are configured to use standard encryption algorithms or crypto
functionality within Apple’s operating system, thus fulfilling the
export compliance.
Copy link
Member

@criezy criezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both changes make sense are are simple. I see no issue with them.

@larsamannen larsamannen merged commit a75d53a into scummvm:master May 9, 2023
@larsamannen larsamannen deleted the ls_fix_inaccurate_touches branch May 9, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants