-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLogiLCD.cpp
More file actions
70 lines (59 loc) · 1.42 KB
/
LogiLCD.cpp
File metadata and controls
70 lines (59 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*******************************************
A Docile Sloth 2016 (adocilesloth@gmail.com)
*******************************************/
#include <obs-module.h>
#include "LCDThreads.h"
using namespace std;
thread LcdThread;
OBS_DECLARE_MODULE()
atomic<bool> close(false);
bool running = true;
bool obs_module_load(void)
{
if(!LogiLcdInit(L"OBS", LOGI_LCD_TYPE_MONO | LOGI_LCD_TYPE_COLOR))
{
running = false;
return true;
}
if(LogiLcdIsConnected(LOGI_LCD_TYPE_MONO) && LogiLcdIsConnected(LOGI_LCD_TYPE_COLOR))
{
//call dual thread
//LcdThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Dual, NULL, 0, 0);
LcdThread = thread(Dual, ref(close));
}
else if(LogiLcdIsConnected(LOGI_LCD_TYPE_MONO))
{
//call mono thread
//LcdThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Mono, NULL, 0, 0);
LcdThread = thread(Mono, ref(close));
}
else if(LogiLcdIsConnected(LOGI_LCD_TYPE_COLOR))
{
//call colour thread
//LcdThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Colour, NULL, 0, 0);
LcdThread = thread(Colour, ref(close));
}
return true;
}
//Calling this causes crashes...
/*void obs_module_unload(void)
{
if(running)
{
close = true;
LcdThread.join();
}
return;
}*/
const char *obs_module_author(void)
{
return "A Docile Sloth";
}
const char *obs_module_name(void)
{
return "Logitech LCD";
}
const char *obs_module_description(void)
{
return "Adds Logitech LCD Monochrome and Colour support";
}