Skip to content

Commit 6f1dd31

Browse files
committed
More features for user idle mode
1 parent dc02e45 commit 6f1dd31

10 files changed

Lines changed: 593 additions & 237 deletions

File tree

LGTV Companion Service/Service.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#pragma comment(lib, "Iphlpapi.lib")
3838

3939
#define APPNAME L"LGTV Companion"
40-
#define APPVERSION L"1.8.7"
40+
#define APPVERSION L"1.9.0"
4141
#define SVCNAME L"LGTVsvc"
4242
#define SVCDISPLAYNAME L"LGTV Companion Service"
4343
#define SERVICE_PORT "3000"

LGTV Companion Setup/Product.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
44
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
55
<?define LGTV Companion Service_TargetDir=$(var.LGTV Companion Service.TargetDir)?><?define LGTV Companion UI_TargetDir=$(var.LGTV Companion UI.TargetDir)?>
6-
<Product Id="73337AE2-4CD1-4283-97CC-392CAFDBBCE6" Name="LGTV Companion" Language="1033" Version="1.8.7" Manufacturer="J Persson" UpgradeCode="0BA17E5B-11CE-491D-B1A1-05DD2D9F610A">
6+
<Product Id="23818710-A2F2-4C03-892C-6A181A31CD27" Name="LGTV Companion" Language="1033" Version="1.9.0" Manufacturer="J Persson" UpgradeCode="0BA17E5B-11CE-491D-B1A1-05DD2D9F610A">
77
<Package Id="*" InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform='x64' Description="LGTV Companion installer" InstallPrivileges="elevated" AdminImage="yes"/>
88
<Media Id="1" Cabinet="LGTVapp.cab" EmbedCab="yes" />
99

LGTV Companion UI/LGTV Companion UI.cpp

Lines changed: 395 additions & 143 deletions
Large diffs are not rendered by default.

LGTV Companion UI/LGTV Companion UI.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
#define APPNAME_SHORT L"LGTVcomp"
5555
#define APPNAME_FULL L"LGTV Companion"
56-
#define APP_VERSION L"1.8.7"
56+
#define APP_VERSION L"1.9.0"
5757
#define WINDOW_CLASS_UNIQUE L"YOLOx0x0x0181818"
5858
#define NOTIFY_NEW_COMMANDLINE 1
5959

@@ -67,6 +67,10 @@
6767
#define JSON_IDLEBLANK "BlankWhenIdle"
6868
#define JSON_IDLEBLANKDELAY "BlankWhenIdleDelay"
6969
#define JSON_ADHERETOPOLOGY "AdhereDisplayTopology"
70+
#define JSON_IDLEWHITELIST "IdleWhiteListEnabled"
71+
#define JSON_IDLEFULLSCREEN "IdleFullscreen"
72+
#define JSON_WHITELIST "IdleWhiteList"
73+
7074
#define DEFAULT_RESTART {"restart"}
7175
#define DEFAULT_SHUTDOWN {"shutdown","power off"}
7276
#define JSON_RDP_POWEROFF "PowerOffDuringRDP"
@@ -89,6 +93,10 @@
8993
#define APP_TOP_PHASE_2 WM_USER+11
9094
#define APP_TOP_PHASE_3 WM_USER+12
9195
#define APP_TOP_NEXT_DISPLAY WM_USER+13
96+
#define APP_LISTBOX_EDIT WM_USER+14
97+
#define APP_LISTBOX_ADD WM_USER+15
98+
#define APP_LISTBOX_DELETE WM_USER+16
99+
#define APP_LISTBOX_REDRAW WM_USER+17
92100

93101
#define APP_CMDLINE_ON 1
94102
#define APP_CMDLINE_OFF 2
@@ -109,6 +117,10 @@
109117
#define VERSIONCHECKLINK L"https://api.github.com/repos/JPersson77/LGTVCompanion/releases"
110118
#define DONATELINK L"https://www.paypal.com/donate/?hosted_button_id=TGZRPAHV4QC62"
111119

120+
struct WHITELIST {
121+
std::wstring Name;
122+
std::wstring Application;
123+
};
112124
struct PREFS {
113125
std::vector<std::string> EventLogRestartString = DEFAULT_RESTART;
114126
std::vector<std::string> EventLogShutdownString = DEFAULT_SHUTDOWN;
@@ -121,6 +133,9 @@ struct PREFS {
121133
int BlankScreenWhenIdleDelay = 10;
122134
bool PowerOffDuringRDP = false;
123135
bool AdhereTopology = false;
136+
bool bIdleWhitelistEnabled = false;
137+
bool bFullscreenCheckEnabled = false;
138+
std::vector<WHITELIST> WhiteList;
124139
};
125140
struct SESSIONPARAMETERS {
126141
std::string DeviceId;
@@ -156,6 +171,7 @@ LRESULT CALLBACK DeviceWndProc(HWND, UINT, WPARAM, LPARAM);
156171
LRESULT CALLBACK OptionsWndProc(HWND, UINT, WPARAM, LPARAM);
157172
LRESULT CALLBACK ConfigureTopologyWndProc(HWND, UINT, WPARAM, LPARAM);
158173
LRESULT CALLBACK UserIdleConfWndProc(HWND, UINT, WPARAM, LPARAM);
174+
LRESULT CALLBACK WhitelistConfWndProc(HWND, UINT, WPARAM, LPARAM);
159175

160176
bool MessageExistingProcess(std::wstring);
161177
bool ReadConfigFile();
2.81 KB
Binary file not shown.

LGTV Companion UI/resource.h

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define IDI_ICON4 149
1919
#define IDI_ICON3 150
2020
#define IDD_ADVANCEDIDLE 153
21+
#define IDD_WHITELIST_EDIT 154
2122
#define IDC_COMBO 1000
2223
#define IDC_SPLIT 1001
2324
#define IDC_OPTIONS 1002
@@ -83,15 +84,20 @@
8384
#define IDC_SYSLINK_CONF 1044
8485
#define IDC_GO2 1045
8586
#define IDC_SYSLINK_CONF2 1045
86-
#define IDC_CHECK1 1045
87+
#define IDC_CHECK_FULLSCREEN 1045
8788
#define IDC_STATIC_NO_5 1046
88-
#define IDC_EDIT1 1046
89-
#define IDC_SPIN1 1047
90-
#define IDC_CHECK2 1049
91-
#define IDC_BUTTON1 1050
92-
#define IDC_BUTTON2 1051
93-
#define IDC_DEVICES 1053
94-
#define IDC_DEVICES2 1054
89+
#define IDC_EDIT_TIME 1046
90+
#define IDC_CHECK_WHITELIST 1049
91+
#define IDC_SYSLINK_ADD 1055
92+
#define IDC_SYSLINK_DELETE 1056
93+
#define IDC_SYSLINK_EDIR 1057
94+
#define IDC_EDIT_NAME 1057
95+
#define IDC_SYSLINK_INFO_2 1058
96+
#define IDC_EDIT_PROCESS 1058
97+
#define IDC_SYSLINK_INFO_3 1059
98+
#define IDC_SYSLINK1 1059
99+
#define IDC_SYSLINK_BROWSE 1059
100+
#define IDC_SYSLINK_INFO_1 1060
95101
#define ID_ADD_MANAGE 32771
96102
#define ID_ADD_MANAGE32772 32772
97103
#define ID_ADD_REMOVE 32773
@@ -116,9 +122,9 @@
116122
#ifdef APSTUDIO_INVOKED
117123
#ifndef APSTUDIO_READONLY_SYMBOLS
118124
#define _APS_NO_MFC 1
119-
#define _APS_NEXT_RESOURCE_VALUE 154
125+
#define _APS_NEXT_RESOURCE_VALUE 155
120126
#define _APS_NEXT_COMMAND_VALUE 32788
121-
#define _APS_NEXT_CONTROL_VALUE 1054
127+
#define _APS_NEXT_CONTROL_VALUE 1060
122128
#define _APS_NEXT_SYMED_VALUE 110
123129
#endif
124130
#endif

0 commit comments

Comments
 (0)