From d4becec9952a3697ba2c7f467ef359b97acfbabe Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 26 Jan 2024 17:07:56 +0900 Subject: [PATCH] Version 1.2.1 Fix client error on toggle recording. Fix extra newline in output when toggling recording from client. --- CMakeLists.txt | 2 +- src/client.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0de3aa..777163a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25) set(obs_usc_VERSION_MAJOR 1) set(obs_usc_VERSION_MINOR 2) -set(obs_usc_VERSION_PATCH 0) +set(obs_usc_VERSION_PATCH 1) set(obs_usc_VERSION_STR "${obs_usc_VERSION_MAJOR}.${obs_usc_VERSION_MINOR}.${obs_usc_VERSION_PATCH}") project(obs-studio-plugin-unix-socket-control VERSION "${obs_usc_VERSION_STR}") diff --git a/src/client.c b/src/client.c index efd833b..e928717 100644 --- a/src/client.c +++ b/src/client.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) { (buffer[1] & 1) != 0 ? "true" : "false", (buffer[1] & 2) != 0 ? "true" : "false", (buffer[1] & 4) != 0 ? "true" : "false"); - } else if (buffer[0] != UNIX_SOCKET_EVENT_NOP) { + } else if (buffer[0] != UNIX_SOCKET_EVENT_NOP && buffer[0] != UNIX_SOCKET_EVENT_TOGGLE_RECORDING) { // Error. TODO handle this. return 7; } else { @@ -124,13 +124,13 @@ int main(int argc, char **argv) { case UNIX_SOCKET_EVENT_TOGGLE_RECORDING: switch(buffer[1]) { case UNIX_SOCKET_EVENT_START_RECORDING: - puts("Sent event \"toggle recording\", stream STARTED!\n"); + puts("Sent event \"toggle recording\", stream STARTED!"); break; case UNIX_SOCKET_EVENT_STOP_RECORDING: - puts("Sent event \"toggle recording\", stream STOPPED!\n"); + puts("Sent event \"toggle recording\", stream STOPPED!"); break; default: - puts("Sent event \"toggle recording\", stream status UNKNOWN!\n"); + puts("Sent event \"toggle recording\", stream status UNKNOWN!"); break; } break;