Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-10-17 22:28:18 +0000
committerStijn Buys <ingar@osirion.org>2010-10-17 22:28:18 +0000
commit7af0f889a4296ad465f829ab6609b3e6efced997 (patch)
treece51717de31bb72197dd99f28d0c9eb9954614f5 /src/client/video.cc
parentf406891947a175f3309db0facd7882afe5471508 (diff)
add input_grab variable
Diffstat (limited to 'src/client/video.cc')
-rw-r--r--src/client/video.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/video.cc b/src/client/video.cc
index aa7ca9e..5610f36 100644
--- a/src/client/video.cc
+++ b/src/client/video.cc
@@ -187,7 +187,8 @@ bool init()
ui::root()->event_resize();
// to grab or not to grab
- if (ui::console()->visible()) {
+ core::Cvar *input_grab = core::Cvar::find("input_grab");
+ if (ui::console()->visible() || (input_grab && input_grab->value())) {
SDL_WM_GrabInput(SDL_GRAB_OFF);
SDL_ShowCursor(SDL_ENABLE);
} else {