noobs 0.0.181 → 0.0.187

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
package/dist/noobs.node CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noobs",
3
- "version": "0.0.181",
3
+ "version": "0.0.187",
4
4
  "description": "A native Node.js addon with libobs bindings for Warcraft Recorder.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/src/utils.cpp CHANGED
@@ -4,12 +4,17 @@
4
4
  #include <chrono>
5
5
  #include <iomanip>
6
6
  #include <sstream>
7
+ #include <mutex>
7
8
  #include "utils.h"
8
9
  #include <windows.h>
9
10
 
10
11
  void log_handler(int lvl, const char *msg, va_list args, void *p) {
12
+ static std::mutex logMutex;
11
13
  static std::stringstream logFileName;
12
14
  static bool logInitialized = false;
15
+
16
+ // make logging thread-safe
17
+ std::lock_guard<std::mutex> lock(logMutex);
13
18
 
14
19
  if (!logInitialized) {
15
20
  // Build the log filename.