mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Free memory after taking screenshot in the app
This commit is contained in:
parent
4376f37bd0
commit
244bebba01
@ -11380,6 +11380,10 @@ function takeScreenshot(callback) {
|
||||
if (AppInterface) {
|
||||
const data = $SCREENSHOT_CANVAS.toDataURL('image/png').split(';base64,')[1];
|
||||
AppInterface.saveScreenshot(GAME_TITLE_ID, data);
|
||||
|
||||
// Free screenshot from memory
|
||||
$canvasContext.clearRect(0, 0, $SCREENSHOT_CANVAS.width, $SCREENSHOT_CANVAS.height);
|
||||
|
||||
callback && callback();
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user