From 2961e8a1425a78fda2cc6a9df81fabe711ea3248 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Fri, 17 Jun 2016 01:27:07 -0400 Subject: [PATCH] remove obsolete no_grab cmdline option --- include/cmdline.h | 1 - src/cmdline/cmdline.cpp | 8 -------- src/graphics/gropengl.cpp | 8 -------- 3 files changed, 17 deletions(-) diff --git a/include/cmdline.h b/include/cmdline.h index a93eb3a..4be65dd 100644 --- a/include/cmdline.h +++ b/include/cmdline.h @@ -187,7 +187,6 @@ extern int Cmdline_spew_pof_info; extern int Cmdline_force_32bit; extern int Cmdline_mouse_coords; extern int Cmdline_timeout; -extern int Cmdline_no_grab; extern int Cmdline_play_movies; extern int Cmdline_fullscreen; extern int Cmdline_window; diff --git a/src/cmdline/cmdline.cpp b/src/cmdline/cmdline.cpp index 8517450..d032f1d 100644 --- a/src/cmdline/cmdline.cpp +++ b/src/cmdline/cmdline.cpp @@ -261,7 +261,6 @@ cmdline_parm timeout("-timeout", "-t", NULL); cmdline_parm d3d_window("-window", "-w", NULL); cmdline_parm d3d_fullscreen("-fullscreen", "-f", NULL); cmdline_parm help("-help", "-h", NULL); -cmdline_parm no_grab("-nograb", "-g", NULL); cmdline_parm fs_version("-version", "-v", NULL); cmdline_parm no_movies("-nomovies", "-n", NULL); @@ -289,7 +288,6 @@ int Cmdline_spew_pof_info = 0; int Cmdline_force_32bit = 0; int Cmdline_mouse_coords = 0; int Cmdline_timeout = -1; -int Cmdline_no_grab = 0; int Cmdline_play_movies = 1; int Cmdline_fullscreen = 0; int Cmdline_window = 0; @@ -439,7 +437,6 @@ static void print_instructions() printf(" [-s | --nosound] Do not access the sound card\n"); printf(" [-f | --fullscreen] Run the game fullscreen\n"); printf(" [-w | --window] Run the game in a window\n"); - printf(" [-g | --nograb] Do not automatically grab mouse\n"); printf(" [-n | --nomovies] Do not play movies\n"); printf(" [-P | --pofspew] Save model info to pofspew.txt\n"); printf(" [-M | --coords] Show coordinates of the mouse cursor\n"); @@ -765,11 +762,6 @@ int parse_cmdline(const char *cmdline) print_instructions(); } - // no key/mouse grab - if(no_grab.found()){ - Cmdline_no_grab = 1; - } - // play movies? if(no_movies.found()){ Cmdline_play_movies = 0; diff --git a/src/graphics/gropengl.cpp b/src/graphics/gropengl.cpp index 719edcc..2b75397 100644 --- a/src/graphics/gropengl.cpp +++ b/src/graphics/gropengl.cpp @@ -221,16 +221,8 @@ void gr_opengl_activate(int active) { if (active) { GL_activate++; - - // don't grab key/mouse if cmdline says so or if we're fullscreen - // if(!Cmdline_no_grab && !(SDL_GetVideoSurface()->flags & SDL_FULLSCREEN)) { - // SDL_WM_GrabInput(SDL_GRAB_ON); - // } } else { GL_deactivate++; - - // let go of mouse/keyboard - // SDL_WM_GrabInput(SDL_GRAB_OFF); } } -- 2.39.2