From 8d5a106ab3158fd4acf8745ae14db96748dc90b2 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Tue, 26 May 2026 16:02:43 +0530 Subject: [PATCH] docs: Update documentation --- README.md | 58 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 4488dcd..f970951 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,36 @@ sudo make install DESTDIR=/some/staging/path make install ``` +## Usage + +```bash +gsplash [game_arguments...] +``` + +Example: + +```bash +gsplash assets/splash.jpg /path/to/game --fullscreen --profile=default + +# Video splash (supported formats depend on ffmpeg build) +gsplash assets/splash.mp4 /path/to/game --fullscreen --profile=default +``` + +Gsplash allows you to configure how the image or video is displayed with 3 modes: + +- `center` (default): letterbox +- `crop`: fill screen by cropping +- `stretch`: Distort to fill screen + +You can set these by using the `-m` or `--mode` flag: + +```bash +build/gsplash [--mode=stretch|center|crop] [args...] + +build/gsplash -m stretch|center|crop [args...] +``` + + ## Testing Gsplash includes several testing utilities to ensure proper functionality without requiring a heavy game binary. @@ -73,31 +103,3 @@ For manual testing, a `dummy_game` binary is built alongside `gsplash`. It mimic ./build/gsplash path/to/image.png ./build/dummy_game 10 ``` -## Usage - -```bash -gsplash [game_arguments...] -``` - -Example: - -```bash -gsplash assets/splash.jpg /path/to/game --fullscreen --profile=default - -# Video splash (supported formats depend on ffmpeg build) -gsplash assets/splash.mp4 /path/to/game --fullscreen --profile=default -``` - -Gsplash allows you to configure how the image or video is displayed with 3 modes: - -- `center` (default): letterbox -- `crop`: fill screen by cropping -- `stretch`: Distort to fill screen - -You can set these by using the `-m` or `--mode` flag: - -```bash -build/gsplash [--mode=stretch|center|crop] [args...] - -build/gsplash -m stretch|center|crop [args...] -```