diff options
Diffstat (limited to 'navit/graphics')
-rw-r--r-- | navit/graphics/android/graphics_android.c | 6 | ||||
-rw-r--r-- | navit/graphics/egl/graphics_egl.c | 8 | ||||
-rw-r--r-- | navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c | 10 | ||||
-rw-r--r-- | navit/graphics/null/graphics_null.c | 2 | ||||
-rw-r--r-- | navit/graphics/opengl/graphics_opengl.c | 8 | ||||
-rw-r--r-- | navit/graphics/qt5/graphics_qt5.cpp | 12 | ||||
-rw-r--r-- | navit/graphics/sdl/graphics_sdl.c | 14 | ||||
-rw-r--r-- | navit/graphics/win32/graphics_win32.c | 10 |
8 files changed, 35 insertions, 35 deletions
diff --git a/navit/graphics/android/graphics_android.c b/navit/graphics/android/graphics_android.c index ccc929432..2109fee7e 100644 --- a/navit/graphics/android/graphics_android.c +++ b/navit/graphics/android/graphics_android.c @@ -931,7 +931,7 @@ static struct graphics_priv *graphics_android_new(struct navit *nav, struct grap ret->padding->right = 0; ret->padding->bottom = 0; /* attr_background_color is the background color for system bars (API 17+ only) */ - if ((attr=attr_search(attrs, NULL, attr_background_color))) { + if ((attr=attr_search(attrs, attr_background_color))) { ret->bgcolor = (attr->u.color->a / 0x101) << 24 | (attr->u.color->r / 0x101) << 16 | (attr->u.color->g / 0x101) << 8 @@ -942,10 +942,10 @@ static struct graphics_priv *graphics_android_new(struct navit *nav, struct grap /* default is the same as for OSD */ ret->bgcolor = 0xa0000000; } - if ((attr=attr_search(attrs, NULL, attr_use_camera))) { + if ((attr=attr_search(attrs, attr_use_camera))) { use_camera=attr->u.num; } - if ((attr=attr_search(attrs, NULL, attr_callback_list))) { + if ((attr=attr_search(attrs, attr_callback_list))) { command_add_table(attr->u.callback_list, commands, sizeof(commands)/sizeof(struct command_table), ret); } image_cache_hash = g_hash_table_new(g_str_hash, g_str_equal); diff --git a/navit/graphics/egl/graphics_egl.c b/navit/graphics/egl/graphics_egl.c index 2da56047c..87291d739 100644 --- a/navit/graphics/egl/graphics_egl.c +++ b/navit/graphics/egl/graphics_egl.c @@ -1254,16 +1254,16 @@ static struct graphics_priv *graphics_opengl_new(struct navit *nav, struct graph this->show_overlays = 1; this->width = SCREEN_WIDTH; - if ((attr = attr_search(attrs, NULL, attr_w))) + if ((attr = attr_search(attrs, attr_w))) this->width = attr->u.num; this->height = SCREEN_HEIGHT; - if ((attr = attr_search(attrs, NULL, attr_h))) + if ((attr = attr_search(attrs, attr_h))) this->height = attr->u.num; this->timeout = 100; - if ((attr = attr_search(attrs, NULL, attr_timeout))) + if ((attr = attr_search(attrs, attr_timeout))) this->timeout = attr->u.num; this->delay = 0; - if ((attr = attr_search(attrs, NULL, attr_delay))) + if ((attr = attr_search(attrs, attr_delay))) this->delay = attr->u.num; this->cbl = cbl; diff --git a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c index 0f57263ee..e9d34dd82 100644 --- a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c +++ b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c @@ -1120,18 +1120,18 @@ static struct graphics_priv *graphics_gtk_drawing_area_new(struct navit *nav, st this->nav = nav; this->widget=draw; this->win_w=792; - if ((attr=attr_search(attrs, NULL, attr_w))) + if ((attr=attr_search(attrs, attr_w))) this->win_w=attr->u.num; this->win_h=547; - if ((attr=attr_search(attrs, NULL, attr_h))) + if ((attr=attr_search(attrs, attr_h))) this->win_h=attr->u.num; this->timeout=100; - if ((attr=attr_search(attrs, NULL, attr_timeout))) + if ((attr=attr_search(attrs, attr_timeout))) this->timeout=attr->u.num; this->delay=0; - if ((attr=attr_search(attrs, NULL, attr_delay))) + if ((attr=attr_search(attrs, attr_delay))) this->delay=attr->u.num; - if ((attr=attr_search(attrs, NULL, attr_window_title))) + if ((attr=attr_search(attrs, attr_window_title))) this->window_title=g_strdup(attr->u.str); else this->window_title=g_strdup("Navit"); diff --git a/navit/graphics/null/graphics_null.c b/navit/graphics/null/graphics_null.c index 552999d45..a04d12b6a 100644 --- a/navit/graphics/null/graphics_null.c +++ b/navit/graphics/null/graphics_null.c @@ -211,7 +211,7 @@ static struct graphics_priv *graphics_null_new(struct navit *nav, struct graphic struct attr *event_loop_system = NULL; *meth=graphics_methods; - event_loop_system = attr_search(attrs, NULL, attr_event_loop_system); + event_loop_system = attr_search(attrs, attr_event_loop_system); if (event_loop_system && event_loop_system->u.str) { dbg(lvl_debug, "event_system is %s", event_loop_system->u.str); diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c index 09292b306..cc644e641 100644 --- a/navit/graphics/opengl/graphics_opengl.c +++ b/navit/graphics/opengl/graphics_opengl.c @@ -1517,16 +1517,16 @@ static struct graphics_priv *graphics_opengl_new(struct navit *nav, struct graph this->overlay_enabled = 1; this->width = SCREEN_WIDTH; - if ((attr = attr_search(attrs, NULL, attr_w))) + if ((attr = attr_search(attrs, attr_w))) this->width = attr->u.num; this->height = SCREEN_HEIGHT; - if ((attr = attr_search(attrs, NULL, attr_h))) + if ((attr = attr_search(attrs, attr_h))) this->height = attr->u.num; this->timeout = 100; - if ((attr = attr_search(attrs, NULL, attr_timeout))) + if ((attr = attr_search(attrs, attr_timeout))) this->timeout = attr->u.num; this->delay = 0; - if ((attr = attr_search(attrs, NULL, attr_delay))) + if ((attr = attr_search(attrs, attr_delay))) this->delay = attr->u.num; this->cbl = cbl; diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp index c87479219..11f480c0a 100644 --- a/navit/graphics/qt5/graphics_qt5.cpp +++ b/navit/graphics/qt5/graphics_qt5.cpp @@ -954,7 +954,7 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics //dbg(lvl_debug,"enter"); /* get qt widget attr */ - if ((attr_widget = attr_search(attrs, NULL, attr_qt5_widget))) { + if ((attr_widget = attr_search(attrs, attr_qt5_widget))) { /* check if we shall use qml */ if (strcmp(attr_widget->u.str, "qwidget") == 0) { use_qml = false; @@ -973,7 +973,7 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics *meth = graphics_methods; /* get event loop from config and request event loop*/ - event_loop_system = attr_search(attrs, NULL, attr_event_loop_system); + event_loop_system = attr_search(attrs, attr_event_loop_system); if (event_loop_system && event_loop_system->u.str) { //dbg(lvl_debug, "event_system is %s", event_loop_system->u.str); if (!event_request_system(event_loop_system->u.str, "graphics_qt5")) @@ -1002,7 +1002,7 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics graphics_priv->argv[graphics_priv->argc] = g_strdup("navit"); graphics_priv->argc++; /* Get qt platform from config */ - if ((platform = attr_search(attrs, NULL, attr_qt5_platform))) { + if ((platform = attr_search(attrs, attr_qt5_platform))) { graphics_priv->argv[graphics_priv->argc] = g_strdup("-platform"); graphics_priv->argc++; graphics_priv->argv[graphics_priv->argc] = g_strdup(platform->u.str); @@ -1062,7 +1062,7 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics graphics_priv->widget = new QNavitWidget(graphics_priv, NULL, Qt::Window); } #endif - if ((fullscreen = attr_search(attrs, NULL, attr_fullscreen)) && (fullscreen->u.num)) { + if ((fullscreen = attr_search(attrs, attr_fullscreen)) && (fullscreen->u.num)) { /* show this maximized */ #if USE_QML if (graphics_priv->window != NULL) @@ -1086,10 +1086,10 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics geomet = primary->availableGeometry(); } /* check for height */ - if ((h = attr_search(attrs, NULL, attr_h)) && (h->u.num > 100)) + if ((h = attr_search(attrs, attr_h)) && (h->u.num > 100)) geomet.setHeight(h->u.num); /* check for width */ - if ((w = attr_search(attrs, NULL, attr_w)) && (w->u.num > 100)) + if ((w = attr_search(attrs, attr_w)) && (w->u.num > 100)) geomet.setWidth(w->u.num); #if USE_QML if (graphics_priv->window != NULL) { diff --git a/navit/graphics/sdl/graphics_sdl.c b/navit/graphics/sdl/graphics_sdl.c index d92699307..af033fed7 100644 --- a/navit/graphics/sdl/graphics_sdl.c +++ b/navit/graphics/sdl/graphics_sdl.c @@ -437,7 +437,7 @@ static void draw_lines(struct graphics_priv *gr, struct graphics_gc_priv *gc, st x_lw_adj = round((float)lw/2.0); y_lw_adj = 0; } else { - angle = (M_PI/2.0) - atan(abs(dx)/abs(dy)); + angle = (M_PI/2.0) - atan(abs((int)dx)/abs((int)dy)); x_lw_adj = round(sin(angle)*(float)lw/2.0); y_lw_adj = round(cos(angle)*(float)lw/2.0); if((x_lw_adj < 0) || (y_lw_adj < 0)) { @@ -1359,17 +1359,17 @@ static struct graphics_priv *graphics_sdl_new(struct navit *nav, struct graphics this->video_flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE; #endif - if ((attr=attr_search(attrs, NULL, attr_w))) + if ((attr=attr_search(attrs, attr_w))) w=attr->u.num; - if ((attr=attr_search(attrs, NULL, attr_h))) + if ((attr=attr_search(attrs, attr_h))) h=attr->u.num; - if ((attr=attr_search(attrs, NULL, attr_bpp))) + if ((attr=attr_search(attrs, attr_bpp))) this->video_bpp=attr->u.num; - if ((attr=attr_search(attrs, NULL, attr_flags))) { + if ((attr=attr_search(attrs, attr_flags))) { if (attr->u.num & 1) this->video_flags = SDL_SWSURFACE; } - if ((attr=attr_search(attrs, NULL, attr_frame))) { + if ((attr=attr_search(attrs, attr_frame))) { if(!attr->u.num) this->video_flags |= SDL_NOFRAME; } @@ -1428,7 +1428,7 @@ static struct graphics_priv *graphics_sdl_new(struct navit *nav, struct graphics this->overlay_enable = 1; this->aa = 1; - if((attr=attr_search(attrs, NULL, attr_antialias))) + if((attr=attr_search(attrs, attr_antialias))) this->aa = attr->u.num; this->resize_callback_initial=1; diff --git a/navit/graphics/win32/graphics_win32.c b/navit/graphics/win32/graphics_win32.c index 6346e59f7..f4eda15f4 100644 --- a/navit/graphics/win32/graphics_win32.c +++ b/navit/graphics/win32/graphics_win32.c @@ -1745,19 +1745,19 @@ static struct graphics_priv* graphics_win32_new( struct navit *nav, struct graph this_=graphics_win32_new_helper(meth); this_->nav=nav; this_->frame=1; - if ((attr=attr_search(attrs, NULL, attr_frame))) + if ((attr=attr_search(attrs, attr_frame))) this_->frame=attr->u.num; this_->x=0; - if ((attr=attr_search(attrs, NULL, attr_x))) + if ((attr=attr_search(attrs, attr_x))) this_->x=attr->u.num; this_->y=0; - if ((attr=attr_search(attrs, NULL, attr_y))) + if ((attr=attr_search(attrs, attr_y))) this_->y=attr->u.num; this_->width=792; - if ((attr=attr_search(attrs, NULL, attr_w))) + if ((attr=attr_search(attrs, attr_w))) this_->width=attr->u.num; this_->height=547; - if ((attr=attr_search(attrs, NULL, attr_h))) + if ((attr=attr_search(attrs, attr_h))) this_->height=attr->u.num; this_->overlays = NULL; this_->cbl=cbl; |