aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-16 11:01:14 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-16 11:01:14 +0200
commitf0b01681684ae771b28201dc95e8e1b27aeac332 (patch)
treeb3113d5e666674bf3ed8bd8306dceac31126b8c3 /src
parenta9b70df25c7042148eb6f9db412d26c71350545a (diff)
Fix /tmp/vr-video-player_ file not being written to when using Q key
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
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();
}
}
}