diff --git a/.gitignore b/.gitignore index 6712c68..303de41 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,16 @@ thumbs.db *.shx *.geojson +*.cpg +*.dbf +*.zip* +*.prj +*.xml +*.html +*.txt + +airportnames +mapnames + + viz1090 diff --git a/View.cpp b/View.cpp index 11626e1..c39bbd9 100644 --- a/View.cpp +++ b/View.cpp @@ -1548,10 +1548,12 @@ void View::draw() { //drawMouse(); drawClick(); - char fps[60] = " "; - snprintf(fps,40," %d lines @ %.1ffps", lineCount, 1000.0 / elapsed(lastFrameTime)); - drawStringBG(fps, 0,0, mapFont, style.subLabelColor, style.backgroundColor); - + if(fps) { + char fps[60] = " "; + snprintf(fps,40," %d lines @ %.1ffps", lineCount, 1000.0 / elapsed(lastFrameTime)); + drawStringBG(fps, 0,0, mapFont, style.subLabelColor, style.backgroundColor); + } + SDL_RenderPresent(renderer); if (elapsed(drawStartTime) < FRAMETIME) { @@ -1569,6 +1571,7 @@ View::View(AppData *appData){ screen_width = 0; screen_height = 0; screen_depth = 32; + fps = 0; fullscreen = 0; screen_index = 0; diff --git a/View.h b/View.h index 187cb99..60157b2 100644 --- a/View.h +++ b/View.h @@ -215,6 +215,8 @@ class View { //////////////// bool metric; + bool fps; + float maxDist; float currentMaxDist; diff --git a/viz1090.cpp b/viz1090.cpp index c3eec99..ad3c964 100644 --- a/viz1090.cpp +++ b/viz1090.cpp @@ -48,16 +48,17 @@ void showHelp(void) { "-----------------------------------------------------------------------------\n" "| viz1090 ADSB Viewer Ver : 0.1 |\n" "-----------------------------------------------------------------------------\n" - "--server TCP Beast output listen IPv4 (default: 127.0.0.1)\n" - "--port TCP Beast output listen port (default: 30005)\n" - "--lat Latitude in degrees\n" - "--lon Longitude in degrees\n" - "--metric Use metric units\n" - "--help Show this help\n" - "--uiscale UI global scaling (default: 1)\n" - "--screensize Set frame buffer resolution (default: screen resolution)\n" - "--screenindex Set the index of the display to use (default: 0)\n" - "--fullscreen Start fullscreen\n" +"--fps Show current framerate\n" +"--fullscreen Start fullscreen\n" +"--help Show this help\n" +"--lat Latitude in degrees\n" +"--lon Longitude in degrees\n" +"--metric Use metric units\n" +"--port TCP Beast output listen port (default: 30005)\n" +"--server TCP Beast output listen IPv4 (default: 127.0.0.1)\n" +"--screensize Set frame buffer resolution (default: screen resolution)\n" +"--screenindex Set the index of the display to use (default: 0)\n" +"--uiscale UI global scaling (default: 1)\n" ); } @@ -94,6 +95,8 @@ int main(int argc, char **argv) { view.centerLon = appData.modes.fUserLon; } else if (!strcmp(argv[j],"--metric")) { view.metric = 1; + } else if (!strcmp(argv[j],"--fps")) { + view.fps = 1; } else if (!strcmp(argv[j],"--fullscreen")) { view.fullscreen = 1; } else if (!strcmp(argv[j],"--screenindex")) {