From 4b712a1293ccb9ef031df4f40fce10805861a05d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 13 Nov 2017 09:11:19 +0100 Subject: [PATCH 1/2] generic-pc: add our proven keymap to glfb Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/8c2983ff8adafed61cd3fed0e9c826b2c03f79ac Author: vanhofen Date: 2017-11-13 (Mon, 13 Nov 2017) Origin message was: ------------------ - generic-pc: add our proven keymap to glfb ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- generic-pc/glfb.cpp | 67 +++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/generic-pc/glfb.cpp b/generic-pc/glfb.cpp index b5abb62..52aaff0 100644 --- a/generic-pc/glfb.cpp +++ b/generic-pc/glfb.cpp @@ -117,36 +117,32 @@ void GLFramebuffer::initKeys() mSpecialMap[GLUT_KEY_LEFT] = KEY_LEFT; mSpecialMap[GLUT_KEY_RIGHT] = KEY_RIGHT; - mSpecialMap[GLUT_KEY_F1] = KEY_RED; - mSpecialMap[GLUT_KEY_F2] = KEY_GREEN; - mSpecialMap[GLUT_KEY_F3] = KEY_YELLOW; - mSpecialMap[GLUT_KEY_F4] = KEY_BLUE; + mSpecialMap[GLUT_KEY_F1] = KEY_RED; + mSpecialMap[GLUT_KEY_F2] = KEY_GREEN; + mSpecialMap[GLUT_KEY_F3] = KEY_YELLOW; + mSpecialMap[GLUT_KEY_F4] = KEY_BLUE; - mSpecialMap[GLUT_KEY_F5] = KEY_PLAY; - mSpecialMap[GLUT_KEY_F6] = KEY_STOP; - mSpecialMap[GLUT_KEY_F7] = KEY_FORWARD; - mSpecialMap[GLUT_KEY_F8] = KEY_REWIND; - - mSpecialMap[GLUT_KEY_F9] = KEY_RECORD; - mSpecialMap[GLUT_KEY_F10] = KEY_PAUSE; + mSpecialMap[GLUT_KEY_F5] = KEY_RECORD; + mSpecialMap[GLUT_KEY_F6] = KEY_PLAY; + mSpecialMap[GLUT_KEY_F7] = KEY_PAUSE; + mSpecialMap[GLUT_KEY_F8] = KEY_STOP; + mSpecialMap[GLUT_KEY_F9] = KEY_FORWARD; + mSpecialMap[GLUT_KEY_F10] = KEY_REWIND; mSpecialMap[GLUT_KEY_F11] = KEY_NEXT; mSpecialMap[GLUT_KEY_F12] = KEY_PREVIOUS; - mSpecialMap[GLUT_KEY_PAGE_UP] = KEY_PAGEUP; - mSpecialMap[GLUT_KEY_PAGE_DOWN] = KEY_PAGEDOWN; + mSpecialMap[GLUT_KEY_F9] = KEY_RECORD; + mSpecialMap[GLUT_KEY_F10] = KEY_PAUSE; + + mSpecialMap[GLUT_KEY_F11] = KEY_NEXT; + mSpecialMap[GLUT_KEY_F12] = KEY_PREVIOUS; + + mSpecialMap[GLUT_KEY_PAGE_UP] = KEY_PAGEUP; + mSpecialMap[GLUT_KEY_PAGE_DOWN] = KEY_PAGEDOWN; mKeyMap[0x0d] = KEY_OK; mKeyMap[0x1b] = KEY_EXIT; - mKeyMap['e'] = KEY_EPG; - mKeyMap['i'] = KEY_INFO; - mKeyMap['m'] = KEY_MENU; - - mKeyMap['+'] = KEY_VOLUMEUP; - mKeyMap['-'] = KEY_VOLUMEDOWN; - mKeyMap['.'] = KEY_MUTE; - mKeyMap['h'] = KEY_HELP; - mKeyMap['p'] = KEY_POWER; mKeyMap['0'] = KEY_0; mKeyMap['1'] = KEY_1; @@ -159,10 +155,29 @@ void GLFramebuffer::initKeys() mKeyMap['8'] = KEY_8; mKeyMap['9'] = KEY_9; - mKeyMap['r'] = KEY_RED; - mKeyMap['g'] = KEY_GREEN; - mKeyMap['y'] = KEY_YELLOW; - mKeyMap['b'] = KEY_BLUE; + mKeyMap['+'] = KEY_VOLUMEUP; + mKeyMap['-'] = KEY_VOLUMEDOWN; + mKeyMap['.'] = KEY_MUTE; + mKeyMap['a'] = KEY_AUDIO; + mKeyMap['e'] = KEY_EPG; + // ['f'] is reserved to toggle fullscreen; + mKeyMap['g'] = KEY_GAMES; + mKeyMap['h'] = KEY_HELP; + mKeyMap['i'] = KEY_INFO; + mKeyMap['m'] = KEY_MENU; + mKeyMap['p'] = KEY_POWER; + mKeyMap['r'] = KEY_RADIO; + mKeyMap['s'] = KEY_SUBTITLE; + mKeyMap['t'] = KEY_TV; + mKeyMap['v'] = KEY_VIDEO; + mKeyMap['z'] = KEY_SLEEP; + + /* shift keys */ + mKeyMap['F'] = KEY_FAVORITES; + mKeyMap['M'] = KEY_MODE; + mKeyMap['S'] = KEY_SAT; + mKeyMap['T'] = KEY_TEXT; + mKeyMap['W'] = KEY_WWW; } void GLFramebuffer::run() From 926d199d31dd5565cc918e75581fe3d0d260a626 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 13 Nov 2017 10:10:19 +0100 Subject: [PATCH 2/2] add display_has_statusline member Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/4ffd5aa6f40fc832e5b5ac8ee1d7ee78c6b66343 Author: vanhofen Date: 2017-11-13 (Mon, 13 Nov 2017) Origin message was: ------------------ - add display_has_statusline member ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- azbox/hardware_caps.c | 1 + generic-pc/hardware_caps.c | 1 + include/hardware_caps.h | 1 + libarmbox/hardware_caps.c | 1 + libduckbox/hardware_caps.c | 1 + libspark/hardware_caps.c | 1 + libtriple/hardware_caps.c | 1 + raspi/hardware_caps.c | 1 + 8 files changed, 8 insertions(+) diff --git a/azbox/hardware_caps.c b/azbox/hardware_caps.c index da8a610..a09da2c 100644 --- a/azbox/hardware_caps.c +++ b/azbox/hardware_caps.c @@ -31,6 +31,7 @@ hw_caps_t *get_hwcaps(void) caps.has_HDMI = 1; caps.display_xres = 8; caps.display_can_deepstandby = 0; + caps.display_has_statusline = 0; strcpy(caps.boxvendor, "AZBox"); const char *tmp; char buf[64]; diff --git a/generic-pc/hardware_caps.c b/generic-pc/hardware_caps.c index 33c3cd8..8fd8038 100644 --- a/generic-pc/hardware_caps.c +++ b/generic-pc/hardware_caps.c @@ -33,6 +33,7 @@ hw_caps_t *get_hwcaps(void) caps.has_HDMI = 1; caps.display_xres = 8; caps.display_can_deepstandby = 0; + caps.display_has_statusline = 0; strcpy(caps.boxvendor, "Generic"); strcpy(caps.boxname, "PC"); if (! uname(&u)) diff --git a/include/hardware_caps.h b/include/hardware_caps.h index 1a8952f..92da189 100644 --- a/include/hardware_caps.h +++ b/include/hardware_caps.h @@ -38,6 +38,7 @@ typedef struct hw_caps int display_yres; int display_can_set_brightness; int display_can_deepstandby; + int display_has_statusline; char boxvendor[64]; char boxname[64]; char boxarch[64]; diff --git a/libarmbox/hardware_caps.c b/libarmbox/hardware_caps.c index 37b06fb..7ec40c8 100644 --- a/libarmbox/hardware_caps.c +++ b/libarmbox/hardware_caps.c @@ -36,6 +36,7 @@ hw_caps_t *get_hwcaps(void) caps.display_type = HW_DISPLAY_LINE_TEXT; caps.display_can_deepstandby = 0; caps.display_can_set_brightness = 1; + caps.display_has_statusline = 0; caps.has_HDMI = 1; strcpy(caps.boxvendor, "AX-Technologies"); strcpy(caps.boxname, "HD51"); diff --git a/libduckbox/hardware_caps.c b/libduckbox/hardware_caps.c index 86355a7..9794338 100644 --- a/libduckbox/hardware_caps.c +++ b/libduckbox/hardware_caps.c @@ -31,6 +31,7 @@ hw_caps_t *get_hwcaps(void) int fd = open("/proc/stb/info/model", O_RDONLY); caps.display_can_set_brightness = 0; caps.display_can_deepstandby = 0; + caps.display_has_statusline = 0; if (fd != -1) { len = read(fd, buf, sizeof(buf) - 1); close(fd); diff --git a/libspark/hardware_caps.c b/libspark/hardware_caps.c index 74d49ce..b17f385 100644 --- a/libspark/hardware_caps.c +++ b/libspark/hardware_caps.c @@ -36,6 +36,7 @@ hw_caps_t *get_hwcaps(void) caps.display_type = HW_DISPLAY_LED_NUM; caps.display_can_set_brightness = 0; caps.display_can_deepstandby = 0; + caps.display_has_statusline = 0; caps.has_HDMI = 1; caps.has_SCART = 1; caps.display_xres = 4; diff --git a/libtriple/hardware_caps.c b/libtriple/hardware_caps.c index 64a92d9..37593fe 100644 --- a/libtriple/hardware_caps.c +++ b/libtriple/hardware_caps.c @@ -21,6 +21,7 @@ static hw_caps_t caps = { .display_xres = 128, .display_yres = 64, .display_can_deepstandby = 0; + .display_has_statusline = 0; .boxvendor = "Armas", .boxname = "TripleDragon" }; diff --git a/raspi/hardware_caps.c b/raspi/hardware_caps.c index 840975b..8b9da53 100644 --- a/raspi/hardware_caps.c +++ b/raspi/hardware_caps.c @@ -31,6 +31,7 @@ hw_caps_t *get_hwcaps(void) caps.has_HDMI = 1; caps.display_xres = 8; caps.display_can_deepstandby = 0; + caps.display_has_statusline = 0; strcpy(caps.boxvendor, "Raspberry"); strcpy(caps.boxname, "Pi");