aboutsummaryrefslogtreecommitdiffstats
path: root/channels/console_gui.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-29 18:50:20 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-29 18:50:20 +0000
commit51e7a64b4d19e588dd8c18e184fd54cf0c0f253a (patch)
tree7798bdbcfced2abcb7814f36f0a8a39760eb3117 /channels/console_gui.c
parent4de1453761a51d6766719df336ace815d0a42153 (diff)
fix wrong argument in checking boundaries for a rectangle
some whitespace fixes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126448 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/console_gui.c')
-rw-r--r--channels/console_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/console_gui.c b/channels/console_gui.c
index ebb2d5312..699e6b1fa 100644
--- a/channels/console_gui.c
+++ b/channels/console_gui.c
@@ -75,7 +75,7 @@ struct keypad_entry {
/* our representation of a displayed window. SDL can only do one main
* window so we map everything within that one
*/
-struct display_window {
+struct display_window {
SDL_Overlay *bmp;
SDL_Rect rect; /* location of the window */
};
@@ -444,6 +444,7 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
case KEY_DIGIT_BACKGROUND:
break;
+
default:
ast_log(LOG_WARNING, "function not yet defined %i\n", index);
}
@@ -1027,7 +1028,7 @@ static int kp_match_area(const struct keypad_entry *e, int x, int y)
xp = ((x - e->x0)*dx + (y - e->y0)*dy)/l;
yp = (-(x - e->x0)*dy + (y - e->y0)*dx)/l;
if (e->type == KP_RECT) {
- ret = (xp >= 0 && xp < l && yp >=0 && yp < l);
+ ret = (xp >= 0 && xp < l && yp >=0 && yp < e->h);
} else if (e->type == KP_CIRCLE) {
dx = xp*xp/(l*l) + yp*yp/(e->h*e->h);
ret = (dx < 1);