feat: add option to ignore focus changes for a specified duration

This commit is contained in:
2026-05-31 18:15:36 +05:30
parent 52b221cf73
commit cac7577ba9
2 changed files with 40 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ DESTDIR=/some/staging/path make install
## Usage
```bash
gsplash <image_or_video_path> <game_executable> [game_arguments...]
gsplash [options] <image_or_video_path> <game_executable> [game_arguments...]
```
Example:
@@ -72,9 +72,17 @@ Gsplash allows you to configure how the image or video is displayed with 3 modes
You can set these by using the `-m` or `--mode` flag:
```bash
build/gsplash [--mode=stretch|center|crop] <background> <executable> [args...]
gsplash [--mode=stretch|center|crop] <background> <executable> [args...]
build/gsplash -m stretch|center|crop <background> <executable> [args...]
gsplash -m stretch|center|crop <background> <executable> [args...]
```
You can optionally protect the splash screen from dismissing on focus changes for a given number of seconds using `-i` or `--ignore-focus=SEC`. This is useful if the game process itself brings up a short-lived focus window before the main game window opens:
```bash
gsplash --ignore-focus=2.5 <background> <executable> [args...]
gsplash -i 2.5 <background> <executable> [args...]
```