mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-19 06:24:19 +01:00
Define macros wrappers for logs
Use macros to wrap SDL_Log* functions with the "application" category.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#include "device.h"
|
||||
#include "log.h"
|
||||
|
||||
SDL_bool device_read_info(TCPsocket device_socket, char *device_name, struct size *size) {
|
||||
unsigned char buf[DEVICE_NAME_FIELD_LENGTH + 4];
|
||||
if (SDLNet_TCP_Recv(device_socket, buf, sizeof(buf)) <= 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not retrieve device information");
|
||||
LOGE("Could not retrieve device information");
|
||||
return SDL_FALSE;
|
||||
}
|
||||
buf[DEVICE_NAME_FIELD_LENGTH - 1] = '\0'; // in case the client sends garbage
|
||||
|
||||
Reference in New Issue
Block a user