Skip to content

Commit db9f79a

Browse files
authored
Merge pull request #1 from mikecarlton/doc-update
2 parents bb5a127 + 6070088 commit db9f79a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

m1ddc.m

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int main(int argc, char** argv) {
2222

2323
IOAVServiceRef avService;
2424

25-
NSString *returnText =@"Controls volume, brightness, contrast of a single external Display connected via USB-C (DisplayPort Alt Mode) over DDC on an M1 Mac.\n"
25+
NSString *returnText =@"Controls volume, brightness, contrast, input of a single external Display connected via USB-C (DisplayPort Alt Mode) over DDC on an M1 Mac.\n"
2626
"Control of displays attached via the HDMI port or by other means is not currently supported.\n"
2727
"\n"
2828
"Example usages:\n"
@@ -37,6 +37,8 @@ int main(int argc, char** argv) {
3737
" set brightness n - Sets brightness to n, where n is a number between 0 and the maximum value (usually 100).\n"
3838
" set contrast n - Sets contrast to n, where n is a number between 0 and the maximum value (usually 100).\n"
3939
" set volume n - Sets volume to n, where n is a number between 0 and the maximum value (usually 100).\n"
40+
" set input n - Sets input source to n, common values include:\n"
41+
" DisplayPort 1: 15, DisplayPort 2: 16, HDMI 1: 17 HDMI 2: 18, USB-C: 27.\n"
4042
"\n"
4143
" set mute on - Sets mute on (you can use 1 instead of 'on')\n"
4244
" set mute off - Sets mute off (you can use 2 instead of 'off')\n"
@@ -233,13 +235,13 @@ int main(int argc, char** argv) {
233235

234236
if ( !(strcmp(argv[s+1], "get")) ) {
235237

236-
returnText = [NSString stringWithFormat:@"%i", curValue];
238+
returnText = [NSString stringWithFormat:@"%i\n", curValue];
237239
returnValue = 0;
238240
goto cya;
239241

240242
} else if ( !(strcmp(argv[s+1], "max")) ) {
241243

242-
returnText = [NSString stringWithFormat:@"%i", maxValue];
244+
returnText = [NSString stringWithFormat:@"%i\n", maxValue];
243245
returnValue = 0;
244246
goto cya;
245247

@@ -294,7 +296,7 @@ int main(int argc, char** argv) {
294296

295297
if ( !(strcmp(argv[s+1], "chg")) ) {
296298

297-
returnText = [NSString stringWithFormat:@"%i", setValue];
299+
returnText = [NSString stringWithFormat:@"%i\n", setValue];
298300
returnValue = 0;
299301
goto cya;
300302

0 commit comments

Comments
 (0)