Skip to content

Commit

Permalink
change ESC to Ctrl+ESC for exit rendering mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu committed Mar 27, 2012
1 parent bbe0e76 commit 5bea662
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gui/guirender.c
Expand Up @@ -36,6 +36,8 @@

#include "guirender.h"

static int ctrl;

static void set_led(char c)
{
int fd;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
}
}
Expand Down

0 comments on commit 5bea662

Please sign in to comment.