Skip to main content

GameLaunchEvent

Electron APIs / overlay / GameLaunchEvent

Event fired when a game is launched.

Provides handlers to inject or dismiss the overlay at game detection.

Example

overlay.on("game-launched", (event, gameInfo) => {
if (gameInfo.isSupported) {
event.inject(); // Inject overlay immediately
} else {
event.dismiss(); // Skip unsupported games
}
});

Properties

PropertyTypeDescription
dismiss() => voidDismiss the overlay. Used to skip injection if the detected game doesn't meet the required conditions.
inject(options?: GameLaunchEventOptions) => voidInject the overlay into the game. See GameLaunchEventOptions. Since 1.8.0.