Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change ESC to Ctrl+ESC for exit rendering mode

  • Loading branch information...
commit 5bea66258b4508933fbe739fdd3534228af4bc33 1 parent bbe0e76
@xiangfu xiangfu authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/gui/guirender.c
View
10 src/gui/guirender.c
@@ -36,6 +36,8 @@
#include "guirender.h"
+static int ctrl;
+
static void set_led(char c)
{
int fd;
@@ -124,12 +126,15 @@ static void input_cb(mtk_event *e, int count)
for(i=0;i<count;i++) {
if((e[i].type == EVENT_TYPE_PRESS) &&
- (e[i].press.code == MTK_KEY_ESC)) {
+ (e[i].press.code == MTK_KEY_ESC) && ctrl) {
guirender_stop();
mtk_input(&e[i+1], count-i-1);
}
if(e[i].type == EVENT_TYPE_PRESS) {
switch(e[i].press.code) {
+ case MTK_KEY_LEFTCTRL:
+ ctrl = 1;
+ break;
case MTK_KEY_F1:
set_video_format(VIDEO_FORMAT_CVBS6);
break;
@@ -152,6 +157,9 @@ static void input_cb(mtk_event *e, int count)
adjust_contrast(-5);
break;
}
+ } else if (e[i].type == EVENT_TYPE_RELEASE) {
+ if(e[i].release.code == MTK_KEY_LEFTCTRL)
+ ctrl = 0;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.