Compare commits

..

8 Commits

Author SHA1 Message Date
Romain Vimont
4c84937186 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-16 10:58:59 +01:00
Romain Vimont
1da65bbc98 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-16 10:52:37 +01:00
Romain Vimont
02949e7574 Add utility to push an SDL event with data
PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-16 10:52:33 +01:00
Romain Vimont
28ba0912d2 Add function to delete current texture
PR #6662 <https://github.com/Genymobile/scrcpy/pull/6662>
2026-03-11 15:41:12 +01:00
Romain Vimont
2145f6ddbd 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-11 15:41:07 +01:00
Romain Vimont
7f5fd43e4e 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-11 15:41:04 +01:00
Romain Vimont
8f51e23645 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-11 15:41:01 +01:00
Romain Vimont
c4aefde96f Rename icon.png to scrcpy.png
This makes the icon name consistent everywhere.

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

View File

@@ -42,6 +42,5 @@ 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,6 +42,5 @@ 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,7 +50,6 @@ 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/"