Editor snapshots: added extra check for mac and ios for allowing screenshots #10247
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.
Fixes https://github.com/microsoft/pxt-minecraft/issues/2613
Just wanted to note that the
disableFileAccessinMaciOs
flag is something that gets set in theappTheme
when theinGame=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 theinGame=1
query variant. I'm thinking about adding the check for that in theenableSnapshot
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!