From a9b70df25c7042148eb6f9db412d26c71350545a Mon Sep 17 00:00:00 2001 From: frostworx Date: Thu, 16 Jul 2020 10:46:53 +0200 Subject: hotkeys for live zoom with temp file --- src/main.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src') 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 #include +#include +#include +#include + #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(); + } } } -- cgit v1.2.3