Skip to content

SaveCPU plugin not working... possible solution with this.game.lockRender #10

Description

@raimon-segura

It seems that SaveCPU plugin won't work since version 2.2.0 because this change:
"Phaser.HEADLESS check removed from the core game loop. If you need to disable rendering you can now override the Phaser.Game.updateRender method instead with your own."

Using lockRender in setRender function seems to work, but I do not know if there is something else to consider.

Phaser.Plugin.SaveCPU.prototype.setRender = function () {
'use strict';
if (this.renderDirty) {
this.game.renderType = this.renderType;
this.game.lockRender = false;
} else {
this.game.renderType = Phaser.HEADLESS;
this.game.lockRender = true;
}
this.renderDirty = false;
};

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions