mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +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) {
|
if (AppInterface) {
|
||||||
const data = $SCREENSHOT_CANVAS.toDataURL('image/png').split(';base64,')[1];
|
const data = $SCREENSHOT_CANVAS.toDataURL('image/png').split(';base64,')[1];
|
||||||
AppInterface.saveScreenshot(GAME_TITLE_ID, data);
|
AppInterface.saveScreenshot(GAME_TITLE_ID, data);
|
||||||
|
|
||||||
|
// Free screenshot from memory
|
||||||
|
$canvasContext.clearRect(0, 0, $SCREENSHOT_CANVAS.width, $SCREENSHOT_CANVAS.height);
|
||||||
|
|
||||||
callback && callback();
|
callback && callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user