GetVersion : legacy attribute "version" fixed to 1.1

The version of OBS Studio and obs-websocket are reported in separate fields
This commit is contained in:
Stéphane Lepin
2016-11-18 22:26:00 +01:00
parent fd1f1a568b
commit c840a89960
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -19,6 +19,6 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#ifndef OBSWEBSOCKET_H
#define OBSWEBSOCKET_H
#define OBS_WEBSOCKET_VERSION 0.2
#define OBS_WEBSOCKET_VERSION "0.2-beta"
#endif // OBSWEBSOCKET_H