diff options
| author | frostworx <frost.zeux@gmail.com> | 2020-07-16 10:46:53 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2020-07-16 10:52:41 +0200 |
| commit | a9b70df25c7042148eb6f9db412d26c71350545a (patch) | |
| tree | dbf925020e3ebf3aeb648a5e14a08321e6b07674 | |
| parent | b9927696f701065f27cda1110a9256b0c4f4efc8 (diff) | |
| download | vr-video-player-a9b70df25c7042148eb6f9db412d26c71350545a.tar.gz | |
hotkeys for live zoom with temp file
| -rw-r--r-- | src/main.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index f799f95..84ac666 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -59,6 +59,10 @@ extern "C" { #include <signal.h> #include <libgen.h> +#include <iostream> +#include <fstream> +#include <sstream> + #define STB_IMAGE_IMPLEMENTATION #include "../dependencies/stb_image.h" @@ -994,6 +998,36 @@ bool CMainApplication::HandleInput() { m_bResetRotation = true; } + if( sdlEvent.key.keysym.sym == SDLK_ESCAPE ) + { + bRet = true; + } + if( sdlEvent.key.keysym.sym == SDLK_q ) + { + zoom -= 0.01f; + window_resized = true; + + std::ofstream zoomstate; + std::stringstream strstr; + strstr << "/tmp/vr-video-player_" << src_window_id << ".txt"; + std::string s = strstr.str(); + zoomstate << zoom; + zoomstate.close(); + } + if( sdlEvent.key.keysym.sym == SDLK_e ) + { + zoom += 0.01f; + window_resized = true; + + std::ofstream zoomstate; + std::stringstream strstr; + strstr << "/tmp/vr-video-player_" << src_window_id << ".txt"; + std::string s = strstr.str(); + zoomstate.open (s); + + zoomstate << zoom; + zoomstate.close(); + } } } |
