diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/defaultsettings.cpp | 1 | ||||
-rw-r--r-- | src/game.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 1d758a2a4..6fcdc1dbb 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -65,6 +65,7 @@ void set_default_settings() g_settings.setDefault("free_move", "false"); g_settings.setDefault("continuous_forward", "false"); g_settings.setDefault("fast_move", "false"); + g_settings.setDefault("invert_mouse", "false"); // Server stuff g_settings.setDefault("enable_experimental", "false"); 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<float> 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 "<<dx<<","<<dy<<std::endl; /*const float keyspeed = 500; |