mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
re-enabled Display Brightness (thx dbo)
Origin commit data
------------------
Branch: master
Commit: d83f6dbfe4
Author: TangoCash <eric@loxat.de>
Date: 2017-06-17 (Sat, 17 Jun 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -29,6 +29,7 @@ hw_caps_t *get_hwcaps(void)
|
||||
char buf[64];
|
||||
int len = -1;
|
||||
int fd = open("/proc/stb/info/model", O_RDONLY);
|
||||
caps.can_set_display_brightness = 0;
|
||||
if (fd != -1) {
|
||||
len = read(fd, buf, sizeof(buf) - 1);
|
||||
close(fd);
|
||||
@@ -54,6 +55,7 @@ hw_caps_t *get_hwcaps(void)
|
||||
caps.can_cec = 1;
|
||||
caps.has_fan = 0;
|
||||
caps.has_CI = 2;
|
||||
caps.can_set_display_brightness = 1;
|
||||
}
|
||||
else if (!strncmp(buf, "ufs913", 6)) {
|
||||
strcpy(caps.boxvendor, "DUCKBOX");
|
||||
@@ -64,6 +66,7 @@ hw_caps_t *get_hwcaps(void)
|
||||
caps.can_cec = 1;
|
||||
caps.has_fan = 0;
|
||||
caps.has_CI = 2;
|
||||
caps.can_set_display_brightness = 1;
|
||||
}
|
||||
else if (!strncmp(buf, "ufs922", 6)) {
|
||||
strcpy(caps.boxvendor, "DUCKBOX");
|
||||
@@ -84,6 +87,7 @@ hw_caps_t *get_hwcaps(void)
|
||||
caps.can_cec = 0;
|
||||
caps.has_fan = 0;
|
||||
caps.has_CI = 2;
|
||||
caps.can_set_display_brightness = 1;
|
||||
}
|
||||
else if (!strncmp(buf, "hdbox", 5)) {
|
||||
strcpy(caps.boxvendor, "DUCKBOX");
|
||||
|
@@ -34,6 +34,7 @@ hw_caps_t *get_hwcaps(void)
|
||||
caps.can_cec = 1;
|
||||
caps.can_shutdown = 1;
|
||||
caps.display_type = HW_DISPLAY_LED_NUM;
|
||||
caps.can_set_display_brightness = 0;
|
||||
caps.has_HDMI = 1;
|
||||
caps.has_SCART = 1;
|
||||
caps.display_xres = 4;
|
||||
@@ -49,6 +50,7 @@ hw_caps_t *get_hwcaps(void)
|
||||
else if (val & 1) { /* VFD = 1, DVFD = 3 */
|
||||
caps.display_type = HW_DISPLAY_LINE_TEXT;
|
||||
caps.display_xres = 8;
|
||||
caps.can_set_display_brightness = 1;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user