Skip to content

Commit 3a850e6

Browse files
committed
libobs: Move API version info to obs-config.h
This way it doesn't interfere with any actual relevant commits related to obs.h.
1 parent bba6848 commit 3a850e6

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

libobs/obs-config.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,40 @@
1717

1818
#pragma once
1919

20+
/*
21+
* LIBOBS_API_VER is returned by module_version in each module.
22+
*
23+
* Libobs uses semantic versioning. See http://semver.org/ for more
24+
* information.
25+
*/
26+
27+
/*
28+
* Increment if major breaking API changes
29+
*/
30+
#define LIBOBS_API_MAJOR_VER 0 /* 0 means development, anything can break */
31+
32+
/*
33+
* Increment if backward-compatible additions
34+
*
35+
* Reset to zero each major version
36+
*/
37+
#define LIBOBS_API_MINOR_VER 2
38+
39+
/*
40+
* Increment if backward-compatible bug fix
41+
*
42+
* Reset to zero each major or minor version
43+
*/
44+
#define LIBOBS_API_PATCH_VER 4
45+
46+
#define LIBOBS_API_VER ((LIBOBS_API_MAJOR_VER << 24) | \
47+
(LIBOBS_API_MINOR_VER << 16) | \
48+
LIBOBS_API_PATCH_VER )
49+
2050
#ifdef HAVE_OBSCONFIG_H
2151
# include "obsconfig.h"
2252
#else
2353

2454
#define OBS_VERSION "unknown"
2555

2656
#endif
27-

libobs/obs.h

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "callback/signal.h"
2727
#include "callback/proc.h"
2828

29+
#include "obs-config.h"
2930
#include "obs-defs.h"
3031
#include "obs-data.h"
3132
#include "obs-ui.h"
@@ -65,36 +66,6 @@ typedef struct obs_service *obs_service_t;
6566
extern "C" {
6667
#endif
6768

68-
/*
69-
* LIBOBS_API_VER is returned by module_version in each module.
70-
*
71-
* Libobs uses semantic versioning. See http://semver.org/ for more
72-
* information.
73-
*/
74-
75-
/*
76-
* Increment if major breaking API changes
77-
*/
78-
#define LIBOBS_API_MAJOR_VER 0 /* 0 means development, anything can break */
79-
80-
/*
81-
* Increment if backward-compatible additions
82-
*
83-
* Reset to zero each major version
84-
*/
85-
#define LIBOBS_API_MINOR_VER 2
86-
87-
/*
88-
* Increment if backward-compatible bug fix
89-
*
90-
* Reset to zero each major or minor version
91-
*/
92-
#define LIBOBS_API_PATCH_VER 4
93-
94-
#define LIBOBS_API_VER ((LIBOBS_API_MAJOR_VER << 24) | \
95-
(LIBOBS_API_MINOR_VER << 16) | \
96-
LIBOBS_API_PATCH_VER )
97-
9869
/** Used for changing the order of items (for example, filters in a source,
9970
* or items in a scene) */
10071
enum order_movement {

0 commit comments

Comments
 (0)