diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-02-24 15:07:13 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-02-25 14:03:38 +0200 |
commit | 92e6e48699f5f94a80d69a94202f0f9c803fa2a7 (patch) | |
tree | 43d98fcea65b0b6fc9e8697310c9135810b40606 /platform/glfw/glfw_view.cpp | |
parent | 4c2e720b1522d2a45980ac8dcf34d2a3783cf426 (diff) | |
download | qtlocation-mapboxgl-92e6e48699f5f94a80d69a94202f0f9c803fa2a7.tar.gz |
[glfw] Make P pause/resume the network thread
Simple test of the DefaultFileSource pause/resume API.
Diffstat (limited to 'platform/glfw/glfw_view.cpp')
-rw-r--r-- | platform/glfw/glfw_view.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index 3c6ea1ded9..15a229d4ae 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -109,10 +109,11 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_) printf("- Press `7` through `0` to add increasing numbers of shape annotations for testing\n"); printf("\n"); printf("- Press `Q` to remove annotations\n"); - printf("- Press `P` to add a random custom runtime imagery annotation\n"); + printf("- Press `K` to add a random custom runtime imagery annotation\n"); printf("- Press `L` to add a random line annotation\n"); printf("- Press `W` to pop the last-added annotation off\n"); printf("\n"); + printf("- Press `P` to pause tile requests\n"); printf("- `Control` + mouse drag to rotate\n"); printf("- `Shift` + mouse drag to tilt\n"); printf("\n"); @@ -200,10 +201,13 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action, auto result = view->map->queryPointAnnotations({ {}, { double(view->getSize().width), double(view->getSize().height) } }); printf("visible point annotations: %lu\n", result.size()); } break; + case GLFW_KEY_P: + view->pauseResumeCallback(); + break; case GLFW_KEY_C: view->clearAnnotations(); break; - case GLFW_KEY_P: + case GLFW_KEY_K: view->addRandomCustomPointAnnotations(1); break; case GLFW_KEY_L: |