Skip to content

Commit

Permalink
address suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Oct 31, 2023
1 parent 3c73aef commit 54be3e5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/main/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ const UserAgents = {
};

export const UserAgent = UserAgents[process.platform] || UserAgents.windows;

export const enum MessageBoxChoice {
Default,
Cancel
}
2 changes: 1 addition & 1 deletion src/main/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from "electron";
import { rm } from "fs/promises";
import { join } from "path";
import { MessageBoxChoice } from "shared/browserWinProperties";
import { IpcEvents } from "shared/IpcEvents";
import { isTruthy } from "shared/utils/guards";
import { once } from "shared/utils/once";
Expand All @@ -29,6 +28,7 @@ import {
DATA_DIR,
DEFAULT_HEIGHT,
DEFAULT_WIDTH,
MessageBoxChoice,
MIN_HEIGHT,
MIN_WIDTH,
UserAgent,
Expand Down
6 changes: 3 additions & 3 deletions src/main/utils/steamOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

import { exec as callbackExec } from "child_process";
import { BrowserWindow, dialog } from "electron";
import { MessageBoxChoice } from "shared/browserWinProperties";
import { promisify } from "util";

import { sleep } from "../../shared/utils/sleep";
import { MessageBoxChoice } from "../constants";
import { Settings } from "../settings";
import { sleep } from "./sleep";

const exec = promisify(callbackExec);

Expand All @@ -20,7 +20,7 @@ const layoutVersion = 1;
const layoutId = "3063409873"; // Vesktop Layout v1
const numberRegex = /^[0-9]*$/;

export const isDeckGameMode = Boolean(process.env.SteamOS === "1" && process.env.SteamGamepadUI === "1");
export const isDeckGameMode = process.env.SteamOS === "1" && process.env.SteamGamepadUI === "1";

export function applyDeckKeyboardFix() {
if (!isDeckGameMode) return;
Expand Down
5 changes: 0 additions & 5 deletions src/shared/browserWinProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,3 @@ export const SplashProps: BrowserWindowConstructorOptions = {
maximizable: false,
alwaysOnTop: true
};

export const enum MessageBoxChoice {
Default,
Cancel
}
File renamed without changes.

0 comments on commit 54be3e5

Please sign in to comment.