diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-07-16 11:01:14 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-16 11:01:14 +0200 |
commit | f0b01681684ae771b28201dc95e8e1b27aeac332 (patch) | |
tree | b3113d5e666674bf3ed8bd8306dceac31126b8c3 /src | |
parent | a9b70df25c7042148eb6f9db412d26c71350545a (diff) |
Fix /tmp/vr-video-player_ file not being written to when using Q key
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp index 84ac666..cbd5dbc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1007,26 +1007,20 @@ bool CMainApplication::HandleInput() 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(); + strstr << "/tmp/vr-video-player_" << src_window_id; + std::ofstream zoomstate(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); - + strstr << "/tmp/vr-video-player_" << src_window_id; + std::ofstream zoomstate(strstr.str()); zoomstate << zoom; - zoomstate.close(); } } } |