Compare commits

..

8 Commits

Author SHA1 Message Date
Romain Vimont
a4000a1487 Display disconnected icon before closing
Previously, when the connection to the device was lost while mirroring,
the window closed immediately, suggesting scrcpy had crashed.

To make it clear that a disconnection occurred, display a disconnected
icon for 2 seconds before closing the window.

PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:35 +01:00
Romain Vimont
6bf8b8d957 Only reject RUN_ON_MAIN_THREAD events on quit
Use SDL_PeepEvents() to consume only SC_EVENT_RUN_ON_MAIN_THREAD events.
Other events are not dropped and can still be processed later.

PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:35 +01:00
Romain Vimont
fe1fd557f7 Add utility to push an SDL event with data
PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:35 +01:00
Romain Vimont
a2055c0a47 Add function to delete current texture
PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:35 +01:00
Romain Vimont
6ca1b79228 Add filename parameter to icon loading
Replace scrcpy_icon_load(), which loaded the unique scrcpy app icon,
with sc_icon_load(filename), which can load any icon from the icons
directory.

PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:34 +01:00
Romain Vimont
d6590738be Replace SCRCPY_ICON_PATH with SCRCPY_ICON_DIR
SCRCPY_ICON_PATH defined the path of the scrcpy app icon.
SCRCPY_ICON_DIR defines the directory where scrcpy icons reside.

This change prepares for the addition of other icons.

PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:34 +01:00
Romain Vimont
c994f9df6a Extract function to build file paths
Add a utility function to create a full path from a directory and a
filename.

PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:34 +01:00
Romain Vimont
8a4955ec57 Rename icon.png to scrcpy.png
This makes the icon name consistent everywhere.

PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-17 18:40:34 +01:00
3 changed files with 3 additions and 0 deletions

View File

@@ -42,5 +42,6 @@ ninja -C "$LINUX_BUILD_DIR"
mkdir -p "$LINUX_BUILD_DIR/dist"
cp "$LINUX_BUILD_DIR"/app/scrcpy "$LINUX_BUILD_DIR/dist/"
cp app/data/scrcpy.png "$LINUX_BUILD_DIR/dist/"
cp app/data/disconnected.png "$LINUX_BUILD_DIR/dist/"
cp app/scrcpy.1 "$LINUX_BUILD_DIR/dist/"
cp -r "$ADB_INSTALL_DIR"/. "$LINUX_BUILD_DIR/dist/"

View File

@@ -42,5 +42,6 @@ ninja -C "$MACOS_BUILD_DIR"
mkdir -p "$MACOS_BUILD_DIR/dist"
cp "$MACOS_BUILD_DIR"/app/scrcpy "$MACOS_BUILD_DIR/dist/"
cp app/data/scrcpy.png "$MACOS_BUILD_DIR/dist/"
cp app/data/disconnected.png "$MACOS_BUILD_DIR/dist/"
cp app/scrcpy.1 "$MACOS_BUILD_DIR/dist/"
cp -r "$ADB_INSTALL_DIR"/. "$MACOS_BUILD_DIR/dist/"

View File

@@ -50,6 +50,7 @@ mkdir -p "$WINXX_BUILD_DIR/dist"
cp "$WINXX_BUILD_DIR"/app/scrcpy.exe "$WINXX_BUILD_DIR/dist/"
cp app/data/scrcpy-noconsole.vbs "$WINXX_BUILD_DIR/dist/"
cp app/data/scrcpy.png "$WINXX_BUILD_DIR/dist/"
cp app/data/disconnected.png "$WINXX_BUILD_DIR/dist/"
cp app/data/open_a_terminal_here.bat "$WINXX_BUILD_DIR/dist/"
cp "$DEPS_INSTALL_DIR"/bin/*.dll "$WINXX_BUILD_DIR/dist/"
cp -r "$ADB_INSTALL_DIR"/. "$WINXX_BUILD_DIR/dist/"