From 77572d53d40dac81f41aed93117910680c026c53 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 6 Jul 1998 21:31:57 +0000 Subject: [PATCH] Added an enable/disable mouse pointer option in case the autodetection fails. --- GUI/gui.cxx | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/GUI/gui.cxx b/GUI/gui.cxx index 84a20aafb..093c754d3 100644 --- a/GUI/gui.cxx +++ b/GUI/gui.cxx @@ -27,6 +27,7 @@ #include #include +#include
#include "gui.h" @@ -132,23 +133,34 @@ puCallback helpSubmenuCb [] = { notCb, notCb, NULL }; void guiInit() { fgGENERAL *g; + fgOPTIONS *o; char *mesa_win_state; g = &general; + o = ¤t_options; // Initialize PUI puInit(); - // Determine if we need to render the cursor, or if the windowing - // system will do it. First test if we are rendering with glide. - if ( strstr ( g->glRenderer, "Glide" ) ) { - // Test for the MESA_GLX_FX env variable - if ( (mesa_win_state = getenv( "MESA_GLX_FX" )) != NULL) { - // test if we are fullscreen mesa/glide - if ( (mesa_win_state[0] == 'f') || (mesa_win_state[0] == 'F') ) { - puShowCursor (); + if ( o->mouse_pointer == 0 ) { + // no preference specified for mouse pointer, attempt to autodetect... + // Determine if we need to render the cursor, or if the windowing + // system will do it. First test if we are rendering with glide. + if ( strstr ( g->glRenderer, "Glide" ) ) { + // Test for the MESA_GLX_FX env variable + if ( (mesa_win_state = getenv( "MESA_GLX_FX" )) != NULL) { + // test if we are fullscreen mesa/glide + if ( (mesa_win_state[0] == 'f') || + (mesa_win_state[0] == 'F') ) { + puShowCursor (); + } } } + } else if ( o->mouse_pointer == 1 ) { + // don't show pointer + } else if ( o->mouse_pointer == 2 ) { + // force showing pointer + puShowCursor(); } // puSetDefaultStyle ( PUSTYLE_SMALL_BEVELLED ); -- 2.39.2