The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

If I want to create a game that prevents users from screen recording with authorization, how would I do that? This should work similarly to how Netflix prevents screen captures; Whenever you try to take a screenshot, the resulting image is black

EDIT: I am now aware that you can do this on android, but my target platform are desktops

Godot version 3.4.3
in Engine by (23 points)
edited by

I'm not sure if this might be a device diference, but when I take a screenshot of, for example, a Chrome incognito tab, my device shows "This app does not allow to take screenshots" and does not take a picture, instead of producing a black image as you described.

I know this can be set during runtime, because you're allowed to take pictures of normal tabs and you can also tweak the app's settings to allow you to take screenshots in incognito.

According to, it's done through a flag called FLAG_SECURE.

Perhaps there is some way to tell Godot to add flags to the window produced when exporting to Android?

This is interesting. unfortunately I am not coding for android though

1 Answer

0 votes

Not sure, but if I were attempting this, I'd probably experiment with the Operating System Functions, like OS.kill() or something..
" Error kill ( int pid )

Kill (terminate) the process identified by the given process ID (pid), e.g. the one returned by execute in non-blocking mode.

Note: This method can also be used to kill processes that were not spawned by the game.

Note: This method is implemented on Android, iOS, Linux, macOS and Windows.

by (214 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.