mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
fix wrong argument in checking boundaries for a rectangle
some whitespace fixes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -148,7 +148,7 @@ struct board *board_setup(SDL_Surface *screen, SDL_Rect *dest,
|
||||
b->cur_col = 0; /* current print column */
|
||||
b->cur_line = 0; /* last line displayed */
|
||||
|
||||
ast_log(LOG_WARNING, "Message board %dx%d@%d,%d successfully initialized\n",
|
||||
if (0) ast_log(LOG_WARNING, "Message board %dx%d@%d,%d successfully initialized\n",
|
||||
b->p_rect->w, b->p_rect->h,
|
||||
b->p_rect->x, b->p_rect->y);
|
||||
return b;
|
||||
|
@@ -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);
|
||||
|
@@ -138,6 +138,5 @@ int reset_board(struct board *b);
|
||||
|
||||
/*! \brief deallocates memory space for a board */
|
||||
void delete_board(struct board *b);
|
||||
|
||||
#endif /* CONSOLE_VIDEO_H */
|
||||
/* end of file */
|
||||
|
Reference in New Issue
Block a user