From ac0b634bac0c22fd913c870900a1bf89c099ab81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Mon, 3 Aug 2015 16:02:21 +0200 Subject: respect fullscreen flag in Linux app --- linux/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linux') diff --git a/linux/main.cpp b/linux/main.cpp index 9acbbb659f..c21d7446e8 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -31,11 +31,11 @@ void quit_handler(int) { } int main(int argc, char *argv[]) { - int fullscreen_flag = 0; + bool fullscreen = false; std::string style; const struct option long_options[] = { - {"fullscreen", no_argument, &fullscreen_flag, 'f'}, + {"fullscreen", no_argument, 0, 'f'}, {"style", required_argument, 0, 's'}, {0, 0, 0, 0} }; @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) { if (long_options[option_index].flag != 0) break; case 'f': - // handle fullscreen_flag + fullscreen = true; break; case 's': style = std::string("asset://") + std::string(optarg); @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) { sigIntHandler.sa_flags = 0; sigaction(SIGINT, &sigIntHandler, NULL); - view = std::make_unique(); + view = std::make_unique(fullscreen); mbgl::SQLiteCache cache("/tmp/mbgl-cache.db"); mbgl::DefaultFileSource fileSource(&cache); -- cgit v1.2.1