altv-issues
                                
                                 altv-issues copied to clipboard
                                
                                    altv-issues copied to clipboard
                            
                            
                            
                        alt.takeScreenshotGameOnly() sometimes captures webview
Description of the problem
alt.takeScreenshotGameOnly() sometimes also captures the webview even though it's not supposed to.
Reproduction steps
This can best be reproduced if calling the function frequently with a very short delay inbetween, some screenshots will have the webview captured.
Expected behaviour
Shouldn't capture the webview
Additional context
No response
Operating system
Windows 11 (21H2)
Version
alt:V build #12.10, branch release
Confirmed on 13.0-dev12
Sometimes can reproduce with steps:
let webview = new alt.WebView("https://google.com");
webview.size = new alt.Vector2(500,500);
for (let i = 0; i < 100; i++)
{
    await alt.takeScreenshotGameOnly();
    if (i == 16) {
        console.log(await alt.takeScreenshotGameOnly());
        return;
    }
}
https://gist.githubusercontent.com/cbmgit/40c1348f6f291db84e59cd06544ba0e1/raw/base64toimage.txt
@litolax @Hardy535 is this still a thing?
Reproduced
Reproduced
Try capping your fps to for example 120 or 100 and the issue should be most likely gone.
There seems to be a bug when you have high fps it shows your webviews and overlays.