@overwolf/ow-electron-packages-types 1.1.6-beta.0 → 1.1.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types.d.ts +202 -5
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -3815,6 +3815,32 @@ interface EncoderInformation {
|
|
|
3815
3815
|
audio: AudioEncoderInfo[];
|
|
3816
3816
|
}
|
|
3817
3817
|
|
|
3818
|
+
/**
|
|
3819
|
+
* Crash dump detail level for the OBS host process.
|
|
3820
|
+
* - `off`: no crash dumps are captured. The OBS text crash report is still
|
|
3821
|
+
* written, and dump files already on disk are left untouched.
|
|
3822
|
+
* - `mini`: small dump (thread stacks + module list); the default.
|
|
3823
|
+
* - `full`: complete-memory dump; large — opt-in for debugging only.
|
|
3824
|
+
*/
|
|
3825
|
+
type CrashDumpType = 'off' | 'mini' | 'full';
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* Crash dump configuration for the OBS host process.
|
|
3829
|
+
*/
|
|
3830
|
+
interface CrashDumpOptions {
|
|
3831
|
+
/**
|
|
3832
|
+
* Dump detail level; defaults to `mini`. Set to `off` to disable crash dump
|
|
3833
|
+
* capture entirely. See {@link CrashDumpType}.
|
|
3834
|
+
*/
|
|
3835
|
+
type?: CrashDumpType;
|
|
3836
|
+
|
|
3837
|
+
/**
|
|
3838
|
+
* Max crash dumps to retain in `ow-obs/crashdumps`; the oldest are deleted
|
|
3839
|
+
* beyond this count. Positive integer, defaults to `3`.
|
|
3840
|
+
*/
|
|
3841
|
+
maxFiles?: number;
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3818
3844
|
/**
|
|
3819
3845
|
* Configuration options for launching or customizing the recording application behavior.
|
|
3820
3846
|
*
|
|
@@ -3850,6 +3876,15 @@ interface RecordingAppOptions {
|
|
|
3850
3876
|
* Must be a positive integer. Defaults to `10`.
|
|
3851
3877
|
*/
|
|
3852
3878
|
maxLogFiles?: number;
|
|
3879
|
+
|
|
3880
|
+
/**
|
|
3881
|
+
* Tune OBS-host crash dumps. Mini-dump capture is on by default; these
|
|
3882
|
+
* options change the detail level and retention count, or turn capture off
|
|
3883
|
+
* entirely via `type: 'off'`.
|
|
3884
|
+
*
|
|
3885
|
+
* @see {@link CrashDumpOptions}
|
|
3886
|
+
*/
|
|
3887
|
+
crashDumps?: CrashDumpOptions;
|
|
3853
3888
|
}
|
|
3854
3889
|
|
|
3855
3890
|
|
|
@@ -4963,6 +4998,43 @@ type ZOrderType = "default" | "topMost" | "bottomMost";
|
|
|
4963
4998
|
|
|
4964
4999
|
|
|
4965
5000
|
|
|
5001
|
+
/**
|
|
5002
|
+
* Which GPU Windows should run this application on.
|
|
5003
|
+
*
|
|
5004
|
+
* - `default`—No preference is recorded; Windows decides (normally the adapter driving the primary display).
|
|
5005
|
+
* - `highPerformance`—Pin the application to the high-performance (usually discrete) adapter.
|
|
5006
|
+
*
|
|
5007
|
+
* @see {@link IOverwolfOverlayApi.setGpuPreference}.
|
|
5008
|
+
*
|
|
5009
|
+
* @since 2.1.0
|
|
5010
|
+
*/
|
|
5011
|
+
type GpuPreference = "default" | "highPerformance";
|
|
5012
|
+
|
|
5013
|
+
/**
|
|
5014
|
+
* Why the shared-texture rendering path cannot be used with the current game.
|
|
5015
|
+
*
|
|
5016
|
+
* - `unsupportedGraphicsApi`—The game's graphics API cannot composite GPU textures
|
|
5017
|
+
* (D3D9 / OpenGL / Vulkan). Nothing to fix; the overlay uses the CPU copy path for this
|
|
5018
|
+
* game.
|
|
5019
|
+
* - `gpuAdapterMismatch`—The game renders on a different GPU adapter than Chromium,
|
|
5020
|
+
* and a shared texture handle can only be opened on the adapter that created it. Fixable
|
|
5021
|
+
* with {@link IOverwolfOverlayApi.setGpuPreference} and an application restart.
|
|
5022
|
+
* - `copyFailure`—The game repeatedly failed to open the shared texture handles it
|
|
5023
|
+
* received in-game. The overlay retried, then fell back to the CPU copy path.
|
|
5024
|
+
* {@link IOverwolfOverlayApi.setGpuPreference} may help when the root cause is
|
|
5025
|
+
* adapter-related.
|
|
5026
|
+
*
|
|
5027
|
+
* @see {@link IOverwolfOverlayApi.on} `shared-texture-unavailable`.
|
|
5028
|
+
*
|
|
5029
|
+
* @since 2.1.0
|
|
5030
|
+
*/
|
|
5031
|
+
type SharedTextureUnavailableReason =
|
|
5032
|
+
| "unsupportedGraphicsApi"
|
|
5033
|
+
| "gpuAdapterMismatch"
|
|
5034
|
+
| "copyFailure";
|
|
5035
|
+
|
|
5036
|
+
|
|
5037
|
+
|
|
4966
5038
|
/**
|
|
4967
5039
|
* Overlay configuration options for creating or modifying an overlay window.
|
|
4968
5040
|
*
|
|
@@ -5062,10 +5134,11 @@ interface OverlayWindowOptions
|
|
|
5062
5134
|
* composites it without any CPU-side pixel copy, significantly lowering
|
|
5063
5135
|
* per-frame CPU overhead.
|
|
5064
5136
|
*
|
|
5065
|
-
* Requires hardware acceleration to be enabled and the
|
|
5066
|
-
*
|
|
5067
|
-
* The flag is silently
|
|
5068
|
-
*
|
|
5137
|
+
* Requires hardware acceleration to be enabled and the shared-texture path to
|
|
5138
|
+
* be usable with the current game (see
|
|
5139
|
+
* {@link GameWindowInfo.isSharedTextureAvailable}). The flag is silently
|
|
5140
|
+
* ignored when either condition is not met, falling back to the
|
|
5141
|
+
* shared-memory (CPU copy) path.
|
|
5069
5142
|
*
|
|
5070
5143
|
* The rendering path follows the active game: when the overlay moves to a
|
|
5071
5144
|
* different game, a shared-texture window automatically falls back to the
|
|
@@ -5434,10 +5507,34 @@ interface GameWindowInfo {
|
|
|
5434
5507
|
readonly isOOPOFullscreenRenderingDisabled?: boolean;
|
|
5435
5508
|
|
|
5436
5509
|
/**
|
|
5437
|
-
* Indicates
|
|
5510
|
+
* Indicates whether the game's **graphics API** supports shared-texture (GPU) overlay
|
|
5511
|
+
* rendering: `true` for D3D11 / D3D12, `false` for D3D9 / OpenGL / Vulkan.
|
|
5512
|
+
*
|
|
5513
|
+
* This is a capability probe only — to decide whether the path can actually be used
|
|
5514
|
+
* on this machine, gate on {@link GameWindowInfo.isSharedTextureAvailable} instead.
|
|
5515
|
+
*
|
|
5516
|
+
* `undefined` until the game is injected and its graphics API is detected.
|
|
5517
|
+
*
|
|
5438
5518
|
* @since 2.0.0
|
|
5439
5519
|
*/
|
|
5440
5520
|
readonly isSharedTextureSupported?: boolean;
|
|
5521
|
+
|
|
5522
|
+
/**
|
|
5523
|
+
* Indicates whether shared-texture (GPU) overlay rendering can actually be used with this
|
|
5524
|
+
* game — gate `useSharedTexture` window creation on it.
|
|
5525
|
+
*
|
|
5526
|
+
* `true` when the game's graphics API supports it
|
|
5527
|
+
* ({@link GameWindowInfo.isSharedTextureSupported}), no GPU adapter mismatch was detected,
|
|
5528
|
+
* **and** the path was not abandoned after repeated in-game copy failures. When it is
|
|
5529
|
+
* `false`, the `shared-texture-unavailable` event names the reason. It can therefore turn
|
|
5530
|
+
* `false` mid-game: the copy-failure verdict is reached only after frames were sent and
|
|
5531
|
+
* repeatedly failed to draw.
|
|
5532
|
+
*
|
|
5533
|
+
* `undefined` until the game is injected and its graphics API is detected.
|
|
5534
|
+
*
|
|
5535
|
+
* @since 2.1.0
|
|
5536
|
+
*/
|
|
5537
|
+
readonly isSharedTextureAvailable?: boolean;
|
|
5441
5538
|
}
|
|
5442
5539
|
|
|
5443
5540
|
/**
|
|
@@ -5898,6 +5995,64 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
5898
5995
|
*/
|
|
5899
5996
|
takeScreenshot(filePath: string, format?: 'jpg' | 'bmp'): Promise<void>;
|
|
5900
5997
|
|
|
5998
|
+
/**
|
|
5999
|
+
* Records a Windows per-executable GPU preference for this application, so
|
|
6000
|
+
* Chromium's GPU process runs on the same adapter as games do.
|
|
6001
|
+
*
|
|
6002
|
+
* The shared-texture path requires that: a shared GPU texture handle can only be opened on
|
|
6003
|
+
* the adapter that created it, and Chromium takes the adapter driving the **primary
|
|
6004
|
+
* display** while games run on the discrete GPU. When those differ the overlay falls back
|
|
6005
|
+
* to the CPU copy path and emits `shared-texture-unavailable`.
|
|
6006
|
+
*
|
|
6007
|
+
* **An application restart is normally required.** DXGI reads this preference when a
|
|
6008
|
+
* process creates its D3D device, which Chromium's GPU process has already done by the time
|
|
6009
|
+
* this API is reachable. Call {@link IOverwolfOverlayApi.getGpuPreference} to learn whether
|
|
6010
|
+
* the application is *already* aligned and therefore needs no restart; this method is
|
|
6011
|
+
* idempotent, so calling it unconditionally is safe.
|
|
6012
|
+
*
|
|
6013
|
+
* **Side effects — read before calling.** It moves the **entire application's**
|
|
6014
|
+
* rendering to that GPU, draining laptop battery and keeping the discrete GPU awake; it is
|
|
6015
|
+
* persistent, user-visible Windows state under
|
|
6016
|
+
* Settings → System → Display → Graphics; and it is keyed on the executable
|
|
6017
|
+
* path, so moving or renaming the application leaves a stale entry behind. It is therefore
|
|
6018
|
+
* **never applied implicitly**. Pass `'default'` to remove the entry, the recommended
|
|
6019
|
+
* revert on uninstall or when the user turns the overlay off.
|
|
6020
|
+
*
|
|
6021
|
+
* @param preference - `'highPerformance'` to pin this application to the high-performance
|
|
6022
|
+
* adapter, or `'default'` to remove the entry and let Windows decide.
|
|
6023
|
+
* @returns A promise that resolves once the preference has been recorded.
|
|
6024
|
+
* @throws If the registry cannot be written, or on a non-Windows platform.
|
|
6025
|
+
* @see {@link GpuPreference}.
|
|
6026
|
+
*
|
|
6027
|
+
* @example
|
|
6028
|
+
* ```ts
|
|
6029
|
+
* overlay.on('shared-texture-unavailable', async (reason) => {
|
|
6030
|
+
* if (reason !== 'gpuAdapterMismatch') return;
|
|
6031
|
+
* if ((await overlay.getGpuPreference()) === 'highPerformance') return;
|
|
6032
|
+
* await overlay.setGpuPreference('highPerformance');
|
|
6033
|
+
* promptUserToRestart(); // takes effect on the next launch
|
|
6034
|
+
* });
|
|
6035
|
+
* ```
|
|
6036
|
+
*
|
|
6037
|
+
* @since 2.1.0
|
|
6038
|
+
*/
|
|
6039
|
+
setGpuPreference(preference: GpuPreference): Promise<void>;
|
|
6040
|
+
|
|
6041
|
+
/**
|
|
6042
|
+
* Returns the GPU preference currently recorded for this application's executable.
|
|
6043
|
+
*
|
|
6044
|
+
* Resolves to `'default'` when no entry exists — "no entry" and "let Windows decide"
|
|
6045
|
+
* are the same state, so this never resolves `undefined`.
|
|
6046
|
+
*
|
|
6047
|
+
* @returns A promise resolving to the recorded preference.
|
|
6048
|
+
* @throws On a non-Windows platform.
|
|
6049
|
+
* @see {@link IOverwolfOverlayApi.setGpuPreference}.
|
|
6050
|
+
* @see {@link GpuPreference}.
|
|
6051
|
+
*
|
|
6052
|
+
* @since 2.1.0
|
|
6053
|
+
*/
|
|
6054
|
+
getGpuPreference(): Promise<GpuPreference>;
|
|
6055
|
+
|
|
5901
6056
|
/**
|
|
5902
6057
|
* Fires when an internal error occurs within the overlay system.
|
|
5903
6058
|
*/
|
|
@@ -6019,6 +6174,48 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
6019
6174
|
eventName: 'game-input-exclusive-mode-changed',
|
|
6020
6175
|
listener: (info: GameInputInterception) => void,
|
|
6021
6176
|
): this;
|
|
6177
|
+
|
|
6178
|
+
/**
|
|
6179
|
+
* Fires when the shared-texture rendering path cannot be used with the current game, with
|
|
6180
|
+
* the reason:
|
|
6181
|
+
*
|
|
6182
|
+
* - `unsupportedGraphicsApi`—the game's graphics API cannot composite GPU textures
|
|
6183
|
+
* (D3D9 / OpenGL / Vulkan). Nothing to fix.
|
|
6184
|
+
* - `gpuAdapterMismatch`—the game renders on a **different GPU adapter than
|
|
6185
|
+
* Chromium**; a shared texture handle can only be opened on the adapter that created it.
|
|
6186
|
+
* Fixable with {@link IOverwolfOverlayApi.setGpuPreference} and a restart; both adapters
|
|
6187
|
+
* are named in the overlay log.
|
|
6188
|
+
* - `copyFailure`—the game **repeatedly failed to open the shared texture handles it
|
|
6189
|
+
* received in-game**. The overlay retried, then abandoned the path for this game.
|
|
6190
|
+
* {@link IOverwolfOverlayApi.setGpuPreference} may help when the root cause is
|
|
6191
|
+
* adapter-related; details are in the overlay log.
|
|
6192
|
+
*
|
|
6193
|
+
* Fires at most **once per injected game**. The first two reasons are detected when the
|
|
6194
|
+
* game's graphics are detected, before any frame is sent; `copyFailure` is reached only
|
|
6195
|
+
* after frames were sent and repeatedly failed to draw. Either way, the affected overlay
|
|
6196
|
+
* windows have already been switched to the CPU copy path by the time the event fires, so
|
|
6197
|
+
* they stay visible and interactive, and
|
|
6198
|
+
* {@link GameWindowInfo.isSharedTextureAvailable} reports `false` for the game.
|
|
6199
|
+
*
|
|
6200
|
+
* @param eventName - `shared-texture-unavailable`
|
|
6201
|
+
* @param listener - Callback invoked once for the current game with the reason.
|
|
6202
|
+
*
|
|
6203
|
+
* @example
|
|
6204
|
+
* ```ts
|
|
6205
|
+
* overlay.on('shared-texture-unavailable', async (reason) => {
|
|
6206
|
+
* if (reason !== 'gpuAdapterMismatch') return;
|
|
6207
|
+
* if ((await overlay.getGpuPreference()) === 'highPerformance') return;
|
|
6208
|
+
* await overlay.setGpuPreference('highPerformance');
|
|
6209
|
+
* promptUserToRestart();
|
|
6210
|
+
* });
|
|
6211
|
+
* ```
|
|
6212
|
+
*
|
|
6213
|
+
* @since 2.1.0
|
|
6214
|
+
*/
|
|
6215
|
+
on(
|
|
6216
|
+
eventName: 'shared-texture-unavailable',
|
|
6217
|
+
listener: (reason: SharedTextureUnavailableReason) => void,
|
|
6218
|
+
): this;
|
|
6022
6219
|
}
|
|
6023
6220
|
|
|
6024
6221
|
|