Linux: SteamVR overlay support (#1299)

* fix: open folder and select item on linux

* feat: linux wrist overlay

* feat: linux hmd overlay

* feat: replace unix sockets with shm on linux

* fix: reduce linux wrist overlay fps

* fix: hide electron offscreen windows

* fix: destroy electron offscreen windows when not in use

* fix: open folder and select item on linux

* feat: cpu, uptime and device monitoring on linux

* feat: native wayland gl context with x11 fallback on linux

* fix: use platform agnostic wording for common folders

* fix: crash dumps folder button on linux

* fix: enable missing VR notification options on linux

* fix: update cef, eslint config to include updated AppApiVr names

* merge: rebase linux VR changes to upstream

* Clean up

* Load custom file contents rather than path

Fixes loading custom file in debug mode

* fix: call SetVR on linux as well

* fix: AppApiVrElectron init, properly create and dispose of shm

* Handle avatar history error

* Lint

* Change overlay dispose logic

* macOS DOTNET_ROOT

* Remove moving dotnet bin

* Fix

* fix: init overlay on SteamVR restart

* Fix fetching empty instance, fix user dialog not fetching

* Trim direct access inputs

* Make icon higher res, because mac build would fail 😂

* macOS fixes

* will it build? that's the question

* fix: ensure offscreen windows are ready before vrinit

* will it build? that's the question

* will it build? that's the question

* meow

* one, more, time

* Fix crash and overlay ellipsis

* a

---------

Co-authored-by: Natsumi <cmcooper123@hotmail.com>
This commit is contained in:
rs189
2025-07-19 09:07:43 +09:00
committed by GitHub
parent 53723d37b0
commit a2dc6ba9a4
53 changed files with 10555 additions and 7865 deletions

View File

@@ -7,6 +7,7 @@ declare global {
interface Window {
$app: any;
AppApi: AppApi;
AppApiVr: AppApiVr;
WebApi: WebApi;
VRCXStorage: VRCXStorage;
SQLite: SQLite;
@@ -51,6 +52,15 @@ declare global {
Function: (event: any, state: { windowState: any }) => void
) => void;
restartApp: () => Promise<void>;
getWristOverlayWindow: () => Promise<boolean>;
getHmdOverlayWindow: () => Promise<boolean>;
updateVr: (
active: bool,
hmdOverlay: bool,
wristOverlay: bool,
menuButton: bool,
overlayHand: int
) => Promise<void>;
};
__APP_GLOBALS__: {
debug: boolean;
@@ -141,7 +151,10 @@ declare global {
};
const Discord: {
SetTimestamps(startTimestamp: number, endTimestamp: number): void;
SetTimestamps(
startTimestamp: number,
endTimestamp: number
): Promise<void>;
SetAssets(
bigIcon: string,
bigIconText: string,
@@ -154,8 +167,8 @@ declare global {
buttonUrl: string,
appId: string,
activityType: number
): void;
SetText(details: string, state: string): void;
): Promise<void>;
SetText(details: string, state: string): Promise<void>;
SetActive(active: boolean): Promise<boolean>;
};
@@ -202,8 +215,8 @@ declare global {
GetLaunchCommand(): Promise<string>;
IPCAnnounceStart(): Promise<void>;
SendIpc(type: string, data: string): Promise<void>;
CustomCssPath(): Promise<string>;
CustomScriptPath(): Promise<string>;
CustomCss(): Promise<string>;
CustomScript(): Promise<string>;
CurrentCulture(): Promise<string>;
CurrentLanguage(): Promise<string>;
GetVersion(): Promise<string>;
@@ -355,21 +368,23 @@ declare global {
};
const AppApiVr: {
Init(): void;
VrInit(): void;
ToggleSystemMonitor(enabled: boolean): void;
CpuUsage(): number;
GetVRDevices(): string[][];
GetUptime(): number;
CurrentCulture(): string;
CustomVrScriptPath(): string;
IsRunningUnderWine(): boolean;
Init(): Promise<void>;
VrInit(): Promise<void>;
ToggleSystemMonitor(enabled: boolean): Promise<void>;
CpuUsage(): Promise<number>;
GetVRDevices(): Promise<string[][]>;
GetUptime(): Promise<number>;
CurrentCulture(): Promise<string>;
CustomVrScript(): Promise<string>;
IsRunningUnderWine(): Promise<boolean>;
GetExecuteVrFeedFunctionQueue(): Promise<Map<string, string>>;
GetExecuteVrOverlayFunctionQueue(): Promise<Map<string, string>>;
};
const WebApi: {
ClearCookies(): void;
GetCookies(): string;
SetCookies(cookie: string): void;
ClearCookies(): Promise<void>;
GetCookies(): Promise<string>;
SetCookies(cookie: string): Promise<void>;
Execute(options: any): Promise<{ Item1: number; Item2: string }>;
ExecuteJson(requestJson: string): Promise<string>;
};
@@ -399,9 +414,9 @@ declare global {
};
const webApiService: {
clearCookies(): void;
getCookies(): string;
setCookies(cookie: string): void;
clearCookies(): Promise<void>;
getCookies(): Promise<string>;
setCookies(cookie: string): Promise<void>;
execute(options: {
url: string;
method: string;

2
src/types/user.d.ts vendored
View File

@@ -128,7 +128,7 @@ interface getCurrentUserResponse extends getUserResponse {
oculusId: string;
offlineFriends: string[];
onlineFriends: string[];
pastDisplayNames: { displayName: string; dateChanged: string }[];
pastDisplayNames: { displayName: string; updated_at: string }[];
picoId: string;
presence?: {
avatarThumbnail: string;