Skip to content

Commit

Permalink
Support 1600x960 as a console resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
cute-the-niini committed Apr 21, 2024
1 parent 9df2693 commit 808c3e7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/kate-core/source/kernel/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { unreachable } from "../utils";

export type ConsoleCaseConfig = {
type: "handheld" | "tv" | "fullscreen";
resolution: 480 | 720;
resolution: 480 | 720 | 960;
scale_to_fit: boolean;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/kate-core/source/native.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ declare global {
get_system_information(): Promise<SystemInfo>;
resize(size: { width: number; height: number }): Promise<void>;
is_fullscreen(): Promise<boolean>;
screen_resolution(): Promise<480 | 720>;
screen_resolution(): Promise<480 | 720 | 960>;
} | null;
}
3 changes: 2 additions & 1 deletion packages/kate-core/source/os/apps/settings/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export class SceneUISettings extends UI.SimpleScene {
}

async select_resolution(current: Observable<ConsoleCaseConfig>) {
const available = current.value.type === "handheld" ? ([480] as const) : ([480, 720] as const);
const available =
current.value.type === "handheld" ? ([480] as const) : ([480, 720, 960] as const);
const result = await this.os.dialog.pop_menu(
"kate:settings",
"Display resolution",
Expand Down
2 changes: 1 addition & 1 deletion packages/kate-desktop/source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const args = parseArgs({
});

const is_fullscreen = args.values.fullscreen ?? false;
const resolution = ["480", "720"].includes(args.values.resolution ?? "720")
const resolution = ["480", "720", "960"].includes(args.values.resolution ?? "720")
? Number(args.values.resolution ?? "720")
: 720;

Expand Down
2 changes: 1 addition & 1 deletion packages/kate-desktop/source/native-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const KateNative = {
return ipcRenderer.invoke("kate:is-fullscreen");
},

async screen_resolution(): Promise<480 | 720> {
async screen_resolution(): Promise<480 | 720 | 960> {
return ipcRenderer.invoke("kate:screen-resolution");
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/kate-tools/source/kate-dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function generate(
config: {
case_mode: {
type: "handheld" | "tv" | "fullscreen";
resolution: 480 | 720;
resolution: 480 | 720 | 960;
scale_to_fit: boolean;
};
}
Expand Down

0 comments on commit 808c3e7

Please sign in to comment.