From 9f7c21a0b48285fe03bef1060557f6e75976d625 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 29 May 2011 21:13:29 +0300 Subject: invert_mouse config option --HG-- extra : rebase_source : 2695ad71185244cefbcf6e3e28ba1ab5e54c882f --- src/game.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index cc758be7e..6932b45f1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -894,6 +894,8 @@ void the_game( core::list frametime_log; float damage_flash_timer = 0; + + bool invert_mouse = g_settings.getBool("invert_mouse"); /* Main loop @@ -1306,6 +1308,8 @@ void the_game( else{ s32 dx = input->getMousePos().X - displaycenter.X; s32 dy = input->getMousePos().Y - displaycenter.Y; + if(invert_mouse) + dy = -dy; //std::cout<<"window active, pos difference "<