mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
[WIP] Add steam overlay fix, add hash to artifact dependency
This commit is contained in:
parent
3f6adbd791
commit
42d9901614
4
electron/package-lock.json
generated
4
electron/package-lock.json
generated
@ -11,7 +11,7 @@
|
||||
"electron": "9.4.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts"
|
||||
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9"
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/get": {
|
||||
@ -1547,7 +1547,7 @@
|
||||
"shapez.io-private-artifacts": {
|
||||
"version": "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git",
|
||||
"integrity": "sha512-Sp3JL2gSJloqkZ5hINBTcrFomwnCD0mguuRMfJb91SkcZfZuySPEtfi7m2S+96GedA1BI6+gLygDRY217ElTFg==",
|
||||
"from": "shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts",
|
||||
"from": "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git",
|
||||
"optional": true
|
||||
},
|
||||
"sprintf-js": {
|
||||
|
@ -13,6 +13,6 @@
|
||||
"electron": "9.4.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts"
|
||||
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9"
|
||||
}
|
||||
}
|
||||
|
@ -498,7 +498,7 @@
|
||||
dependencies:
|
||||
"type-fest" "^0.13.1"
|
||||
|
||||
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts":
|
||||
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9":
|
||||
"integrity" "sha512-Sp3JL2gSJloqkZ5hINBTcrFomwnCD0mguuRMfJb91SkcZfZuySPEtfi7m2S+96GedA1BI6+gLygDRY217ElTFg=="
|
||||
"resolved" "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git"
|
||||
"version" "0.1.0"
|
||||
|
@ -151,6 +151,11 @@ function gulptasksStandalone($, gulp) {
|
||||
|
||||
fs.writeFileSync(path.join(appPath, ".itch.toml"), tomlFile);
|
||||
|
||||
fse.copySync(
|
||||
path.join(tempDestBuildDir, "steam_appid.txt"),
|
||||
path.join(appPath, "steam_appid.txt")
|
||||
);
|
||||
|
||||
if (platform === "linux") {
|
||||
fs.writeFileSync(
|
||||
path.join(appPath, "play.sh"),
|
||||
|
@ -9,12 +9,26 @@ const logger = createLogger("electron-wrapper");
|
||||
|
||||
export class PlatformWrapperImplElectron extends PlatformWrapperImplBrowser {
|
||||
initialize() {
|
||||
this.steamOverlayCanvasFix = document.createElement("canvas");
|
||||
this.steamOverlayCanvasFix.width = 1;
|
||||
this.steamOverlayCanvasFix.height = 1;
|
||||
this.steamOverlayCanvasFix.id = "steamOverlayCanvasFix";
|
||||
|
||||
this.steamOverlayContextFix = this.steamOverlayCanvasFix.getContext("2d");
|
||||
document.documentElement.appendChild(this.steamOverlayCanvasFix);
|
||||
|
||||
this.app.ticker.frameEmitted.add(this.steamOverlayFixRedrawCanvas, this);
|
||||
|
||||
this.app.storage = new StorageImplElectron(this);
|
||||
this.app.achievements = new SteamAchievements(this.app);
|
||||
|
||||
return PlatformWrapperInterface.prototype.initialize.call(this);
|
||||
}
|
||||
|
||||
steamOverlayFixRedrawCanvas() {
|
||||
this.steamOverlayContextFix.clearRect(0, 0, 1, 1);
|
||||
}
|
||||
|
||||
getId() {
|
||||
return "electron";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user