@overwolf/ow-electron-packages-types 1.1.6-beta.1 → 1.1.6
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 +175 -9
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -3817,17 +3817,20 @@ interface EncoderInformation {
|
|
|
3817
3817
|
|
|
3818
3818
|
/**
|
|
3819
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.
|
|
3820
3822
|
* - `mini`: small dump (thread stacks + module list); the default.
|
|
3821
3823
|
* - `full`: complete-memory dump; large — opt-in for debugging only.
|
|
3822
3824
|
*/
|
|
3823
|
-
type CrashDumpType = 'mini' | 'full';
|
|
3825
|
+
type CrashDumpType = 'off' | 'mini' | 'full';
|
|
3824
3826
|
|
|
3825
3827
|
/**
|
|
3826
3828
|
* Crash dump configuration for the OBS host process.
|
|
3827
3829
|
*/
|
|
3828
3830
|
interface CrashDumpOptions {
|
|
3829
3831
|
/**
|
|
3830
|
-
* Dump detail level; defaults to `mini`.
|
|
3832
|
+
* Dump detail level; defaults to `mini`. Set to `off` to disable crash dump
|
|
3833
|
+
* capture entirely. See {@link CrashDumpType}.
|
|
3831
3834
|
*/
|
|
3832
3835
|
type?: CrashDumpType;
|
|
3833
3836
|
|
|
@@ -3875,8 +3878,9 @@ interface RecordingAppOptions {
|
|
|
3875
3878
|
maxLogFiles?: number;
|
|
3876
3879
|
|
|
3877
3880
|
/**
|
|
3878
|
-
* Tune OBS-host crash dumps. Mini-dump capture is
|
|
3879
|
-
*
|
|
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'`.
|
|
3880
3884
|
*
|
|
3881
3885
|
* @see {@link CrashDumpOptions}
|
|
3882
3886
|
*/
|
|
@@ -4994,6 +4998,43 @@ type ZOrderType = "default" | "topMost" | "bottomMost";
|
|
|
4994
4998
|
|
|
4995
4999
|
|
|
4996
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
|
+
|
|
4997
5038
|
/**
|
|
4998
5039
|
* Overlay configuration options for creating or modifying an overlay window.
|
|
4999
5040
|
*
|
|
@@ -5093,10 +5134,11 @@ interface OverlayWindowOptions
|
|
|
5093
5134
|
* composites it without any CPU-side pixel copy, significantly lowering
|
|
5094
5135
|
* per-frame CPU overhead.
|
|
5095
5136
|
*
|
|
5096
|
-
* Requires hardware acceleration to be enabled and the
|
|
5097
|
-
*
|
|
5098
|
-
* The flag is silently
|
|
5099
|
-
*
|
|
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.
|
|
5100
5142
|
*
|
|
5101
5143
|
* The rendering path follows the active game: when the overlay moves to a
|
|
5102
5144
|
* different game, a shared-texture window automatically falls back to the
|
|
@@ -5465,10 +5507,34 @@ interface GameWindowInfo {
|
|
|
5465
5507
|
readonly isOOPOFullscreenRenderingDisabled?: boolean;
|
|
5466
5508
|
|
|
5467
5509
|
/**
|
|
5468
|
-
* 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
|
+
*
|
|
5469
5518
|
* @since 2.0.0
|
|
5470
5519
|
*/
|
|
5471
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;
|
|
5472
5538
|
}
|
|
5473
5539
|
|
|
5474
5540
|
/**
|
|
@@ -5929,6 +5995,64 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
5929
5995
|
*/
|
|
5930
5996
|
takeScreenshot(filePath: string, format?: 'jpg' | 'bmp'): Promise<void>;
|
|
5931
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
|
+
|
|
5932
6056
|
/**
|
|
5933
6057
|
* Fires when an internal error occurs within the overlay system.
|
|
5934
6058
|
*/
|
|
@@ -6050,6 +6174,48 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
6050
6174
|
eventName: 'game-input-exclusive-mode-changed',
|
|
6051
6175
|
listener: (info: GameInputInterception) => void,
|
|
6052
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;
|
|
6053
6219
|
}
|
|
6054
6220
|
|
|
6055
6221
|
|