b3f5dfe1de
Modify the return logic such that exit code 1 is used when the initial connection fails, but if a session is established, and then the device disconnects, exit code 2 is emitted. Fixes #3083 <https://github.com/Genymobile/scrcpy/issues/3083> PR #3085 <https://github.com/Genymobile/scrcpy/pull/3085> Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Romain Vimont <rom@rom1v.com>
23 lines
400 B
C
23 lines
400 B
C
#ifndef SCRCPY_H
|
|
#define SCRCPY_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdbool.h>
|
|
#include "options.h"
|
|
|
|
enum scrcpy_exit_code {
|
|
// Normal program termination
|
|
SCRCPY_EXIT_SUCCESS,
|
|
|
|
// No connection could be established
|
|
SCRCPY_EXIT_FAILURE,
|
|
|
|
// Device was disconnected while running
|
|
SCRCPY_EXIT_DISCONNECTED,
|
|
};
|
|
|
|
enum scrcpy_exit_code
|
|
scrcpy(struct scrcpy_options *options);
|
|
|
|
#endif
|