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
Property | Type | Description |
---|---|---|
dismiss | () => void | Dismiss the overlay. Used to skip injection if the detected game doesn't meet the required conditions. |
inject | (options? : GameLaunchEventOptions ) => void | Inject the overlay into the game. See GameLaunchEventOptions. Since 1.8.0. |