Replace SDL types by C99 standard types
Scrcpy is a C11 project. Use the C99 standard types instead of the
SDL-specific types:
SDL_bool -> bool
SintXX -> intXX_t
UintXX -> uintXX_t
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#ifndef SERVER_H
|
||||
#define SERVER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "net.h"
|
||||
|
||||
@@ -9,10 +12,10 @@ struct server {
|
||||
process_t process;
|
||||
socket_t server_socket; // only used if !tunnel_forward
|
||||
socket_t device_socket;
|
||||
Uint16 local_port;
|
||||
SDL_bool tunnel_enabled;
|
||||
SDL_bool tunnel_forward; // use "adb forward" instead of "adb reverse"
|
||||
SDL_bool send_frame_meta; // request frame PTS to be able to record properly
|
||||
uint16_t local_port;
|
||||
bool tunnel_enabled;
|
||||
bool tunnel_forward; // use "adb forward" instead of "adb reverse"
|
||||
bool send_frame_meta; // request frame PTS to be able to record properly
|
||||
};
|
||||
|
||||
#define SERVER_INITIALIZER { \
|
||||
@@ -21,9 +24,9 @@ struct server {
|
||||
.server_socket = INVALID_SOCKET, \
|
||||
.device_socket = INVALID_SOCKET, \
|
||||
.local_port = 0, \
|
||||
.tunnel_enabled = SDL_FALSE, \
|
||||
.tunnel_forward = SDL_FALSE, \
|
||||
.send_frame_meta = SDL_FALSE, \
|
||||
.tunnel_enabled = false, \
|
||||
.tunnel_forward = false, \
|
||||
.send_frame_meta = false, \
|
||||
}
|
||||
|
||||
// init default values
|
||||
@@ -31,10 +34,10 @@ void
|
||||
server_init(struct server *server);
|
||||
|
||||
// push, enable tunnel et start the server
|
||||
SDL_bool
|
||||
bool
|
||||
server_start(struct server *server, const char *serial,
|
||||
Uint16 local_port, Uint16 max_size, Uint32 bit_rate,
|
||||
const char *crop, SDL_bool send_frame_meta);
|
||||
uint16_t local_port, uint16_t max_size, uint32_t bit_rate,
|
||||
const char *crop, bool send_frame_meta);
|
||||
|
||||
// block until the communication with the server is established
|
||||
socket_t
|
||||
|
||||
Reference in New Issue
Block a user