Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor snapshots: added extra check for mac and ios for allowing screenshots #10247

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

srietkerk
Copy link
Contributor

Fixes https://github.com/microsoft/pxt-minecraft/issues/2613

Just wanted to note that the disableFileAccessinMaciOs flag is something that gets set in the appTheme when the inGame=1 query variant exists. So there's a niceness because if the file access is disabled, we shouldn't allow for screenshots, but it also is a tell that we're in game for Minecraft.

Another point is that we are also setting disableFileAccessInAndroid to true with the inGame=1 query variant. I'm thinking about adding the check for that in the enableSnapshot function as well. However, I think leaving snapshots on for android is fine; at least testing in browser on my phone worked great. I would need to test on a Chromebook to see if it would work in game, though.

Upload target: https://minecraft.makecode.com/app/2255ed413beea760a738e01f155fc4d9e0fe2948-a1ffd9d0b1?inGame=1#editor
There should really only be a change with Mac/Ipad with this upload target, but, if you also want to check that nothing changes on windows/android, feel free to test!

@srietkerk srietkerk requested a review from a team October 26, 2024 00:02
Copy link
Contributor

@thsparks thsparks left a comment

Choose a reason for hiding this comment

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

Per your description, I have a hunch that if disableFileAccessInAndroid exists, we should also respect that here. I agree it's worth testing, though if screenshots do work, I wonder if we should still check for it here but just not set the flag in the app theme.

Either way, this looks good to fix the bug!

@srietkerk srietkerk merged commit 0088816 into master Oct 28, 2024
6 checks passed
@srietkerk srietkerk deleted the srietkerk/mc-mac-ios-snapshot branch October 28, 2024 22:09
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