mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
Package Arroquw's Alt1 Electron fork from source, configure its protocol and persistence, and add Hyprland rules for XWayland overlays. Patch the capture IPC so settings diagnostics and applets can use the detected RuneScape client. Assisted-by: pi (openai-codex/gpt-5.6-sol)
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
--- a/src/ipcapi.ts
|
|
+++ b/src/ipcapi.ts
|
|
@@ -5,7 +5,7 @@
|
|
import { admins, fixTooltip, getManagedAppWindow, ManagedWindow, openApp } from "./main";
|
|
import { native } from "./native";
|
|
import { settings } from "./settings";
|
|
-import { FlatImageData, OverlayCommand, Rectangle, RsClientState, imageDataFrom } from "./shared";
|
|
+import { FlatImageData, OverlayCommand, Rectangle, RsClientState } from "./shared";
|
|
import { getRsInstanceFromWnd, rsInstances } from "./rsinstance";
|
|
import * as fs from 'fs';
|
|
|
|
@@ -252,13 +252,12 @@
|
|
? (((mx & 0xFFFF) << 16) | (my & 0xFFFF))
|
|
: -1;
|
|
|
|
- let wnd = expectAppWindow(e);
|
|
let state: RsClientState = {
|
|
- active: wnd.rsClient.isActive,
|
|
- clientRect: wnd.rsClient.window.getClientBounds(),
|
|
- lastActiveTime: wnd.rsClient.lastActiveTime,
|
|
+ active: client.isActive,
|
|
+ clientRect: client.window.getClientBounds(),
|
|
+ lastActiveTime: client.lastActiveTime,
|
|
ping: 10,//TODO
|
|
- scaling: wnd.rsClient.window.getScale(),
|
|
+ scaling: client.window.getScale(),
|
|
captureMode: settings.captureMode,
|
|
mousePosition: mousePosition
|
|
};
|
|
@@ -268,7 +267,6 @@
|
|
ipcMain.handle("capture", (e: any, x: any, y: any, width: any, height: any) => {
|
|
let client = expectPermittedRsClient(e);
|
|
let capt = native.captureWindowMulti(client.window.handle, settings.captureMode, { main: { x, y, width, height } });
|
|
- let data: ImageData = imageDataFrom(capt.main, width, height);
|
|
return capt.main;
|
|
});
|
|
|