summaryrefslogtreecommitdiff
path: root/platform/glfw/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/glfw/main.cpp')
-rw-r--r--platform/glfw/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp
index 784e002a65..fa1ac73799 100644
--- a/platform/glfw/main.cpp
+++ b/platform/glfw/main.cpp
@@ -95,9 +95,6 @@ int main(int argc, char *argv[]) {
mbgl::Log::Info(mbgl::Event::General, "BENCHMARK MODE: Some optimizations are disabled.");
}
- GLFWView backend(fullscreen, benchmark);
- view = &backend;
-
// Set access token if present
std::string token(getenv("MAPBOX_ACCESS_TOKEN") ?: "");
if (token.empty()) {
@@ -107,6 +104,9 @@ int main(int argc, char *argv[]) {
mbgl::ResourceOptions resourceOptions;
resourceOptions.withCachePath(cacheDB).withAccessToken(token);
+ GLFWView backend(fullscreen, benchmark, resourceOptions);
+ view = &backend;
+
std::shared_ptr<mbgl::FileSource> onlineFileSource =
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, resourceOptions);
if (!settings.online) {