From c840a89960ee3fa9be9144855d5224eee10e9ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Fri, 18 Nov 2016 22:26:00 +0100 Subject: [PATCH] GetVersion : legacy attribute "version" fixed to 1.1 The version of OBS Studio and obs-websocket are reported in separate fields --- WSRequestHandler.cpp | 6 +++--- obs-websocket.cpp | 2 +- obs-websocket.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WSRequestHandler.cpp b/WSRequestHandler.cpp index 09cac496..871b213c 100644 --- a/WSRequestHandler.cpp +++ b/WSRequestHandler.cpp @@ -137,9 +137,9 @@ void WSRequestHandler::SendErrorResponse(const char *errorMessage) { void WSRequestHandler::HandleGetVersion(WSRequestHandler *owner) { obs_data_t *data = obs_data_create(); - obs_data_set_double(data, "version", OBS_WEBSOCKET_VERSION); - obs_data_set_bool(data, "studio", true); - obs_data_set_string(data, "studio-version", OBS_VERSION); + obs_data_set_double(data, "version", 1.1); + obs_data_set_string(data, "obs-websocket-version", OBS_WEBSOCKET_VERSION); + obs_data_set_string(data, "obs-studio-version", OBS_VERSION); owner->SendOKResponse(data); obs_data_release(data); diff --git a/obs-websocket.cpp b/obs-websocket.cpp index a0cdee3e..b34e6e49 100644 --- a/obs-websocket.cpp +++ b/obs-websocket.cpp @@ -35,7 +35,7 @@ SettingsDialog *settings_dialog; bool obs_module_load(void) { - blog(LOG_INFO, "[obs-websockets] you can haz websockets (version %.1f)", OBS_WEBSOCKET_VERSION); + blog(LOG_INFO, "[obs-websockets] you can haz websockets (version %s)", OBS_WEBSOCKET_VERSION); server = new WSServer(4444); eventHandler = new WSEvents(server); diff --git a/obs-websocket.h b/obs-websocket.h index 6fbc6de0..f771698a 100644 --- a/obs-websocket.h +++ b/obs-websocket.h @@ -19,6 +19,6 @@ with this program. If not, see #ifndef OBSWEBSOCKET_H #define OBSWEBSOCKET_H -#define OBS_WEBSOCKET_VERSION 0.2 +#define OBS_WEBSOCKET_VERSION "0.2-beta" #endif // OBSWEBSOCKET_H \ No newline at end of file