Display disconnected icon before closing by rom1v · Pull Request #6662 · Genymobile/scrcpy (original) (raw)
rom1v changed the title
Display disconnected icon before closing [Draft] Display disconnected icon before closing
rom1v added a commit that referenced this pull request
This makes the icon name consistent everywhere.
rom1v added a commit that referenced this pull request
Add a utility function to create a full path from a directory and a filename.
rom1v added a commit that referenced this pull request
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.
rom1v added a commit that referenced this pull request
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.
rom1v added a commit that referenced this pull request
rom1v added a commit that referenced this pull request
rom1v added a commit that referenced this pull request
Use SDL_PeepEvents() to consume only SC_EVENT_RUN_ON_MAIN_THREAD events. Other events are not dropped and can still be processed later.
rom1v added a commit that referenced this pull request
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.
rom1v changed the title
[Draft] Display disconnected icon before closing Display disconnected icon before closing
This makes the icon name consistent everywhere.
Add a utility function to create a full path from a directory and a filename.
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.
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.
Use SDL_PeepEvents() to consume only SC_EVENT_RUN_ON_MAIN_THREAD events. Other events are not dropped and can still be processed later.
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.
rom1v added a commit that referenced this pull request
rom1v added a commit that referenced this pull request
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
Add a utility function to create a full path from a directory and a filename.
PR #6662 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
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 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
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 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
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 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
Use a flag to determine whether the window is currently shown.
This replaces the old has_video_window flag, which was true only when the window was shown and video was enabled.
This will simplify displaying a "disconnected" icon on device disconnection when the window is currently shown.
PR #6662 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
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 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
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 <Genymobile/scrcpy#6662>
chhaseeb47 pushed a commit to chhaseeb47/mirrorscreen that referenced this pull request
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 <Genymobile/scrcpy#6662>
rom1v added a commit that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})