Added _windowed_mouse to OpenGL video menu. Defaulted to 1 for glx and sdl_* renderers.

This commit is contained in:
Jay Dolan 2006-01-14 20:22:49 +00:00
parent 3ecc9cc96d
commit 2587a5e03e
3 changed files with 18 additions and 18 deletions

View file

@ -355,7 +355,7 @@ void RW_IN_Init(in_state_t *in_state_p){
#endif #endif
// mouse variables // mouse variables
_windowed_mouse = ri.Cvar_Get( "_windowed_mouse", "0", CVAR_ARCHIVE); _windowed_mouse = ri.Cvar_Get( "_windowed_mouse", "1", CVAR_ARCHIVE);
#ifdef HAVE_JOYSTICK #ifdef HAVE_JOYSTICK
in_joystick = ri.Cvar_Get("in_joystick", "1", CVAR_ARCHIVE); in_joystick = ri.Cvar_Get("in_joystick", "1", CVAR_ARCHIVE);

View file

@ -157,7 +157,7 @@ void RW_IN_Init(in_state_t *in_state_p){
in_state = in_state_p; in_state = in_state_p;
// mouse variables // mouse variables
_windowed_mouse = ri.Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE); _windowed_mouse = ri.Cvar_Get("_windowed_mouse", "1", CVAR_ARCHIVE);
m_filter = ri.Cvar_Get("m_filter", "0", 0); m_filter = ri.Cvar_Get("m_filter", "0", 0);
in_mouse = ri.Cvar_Get("in_mouse", "1", CVAR_ARCHIVE); in_mouse = ri.Cvar_Get("in_mouse", "1", CVAR_ARCHIVE);
#ifdef HAVE_JOYSTICK #ifdef HAVE_JOYSTICK

View file

@ -72,7 +72,7 @@ static menuslider_s s_brightness_slider[2];
static menulist_s s_fs_box[2]; static menulist_s s_fs_box[2];
static menulist_s s_stipple_box; static menulist_s s_stipple_box;
static menulist_s s_paletted_texture_box; static menulist_s s_paletted_texture_box;
static menulist_s s_windowed_mouse; static menulist_s s_windowed_mouse[2];
static menuaction_s s_apply_action[2]; static menuaction_s s_apply_action[2];
static menuaction_s s_defaults_action[2]; static menuaction_s s_defaults_action[2];
@ -139,7 +139,7 @@ static void ApplyChanges( void *unused){
Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue); Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue);
Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue); Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue);
Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue); Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue);
Cvar_SetValue( "_windowed_mouse", s_windowed_mouse.curvalue); Cvar_SetValue( "_windowed_mouse", s_windowed_mouse[s_current_menu_index].curvalue);
switch( s_ref_list[s_current_menu_index].curvalue){ switch( s_ref_list[s_current_menu_index].curvalue){
case REF_SOFT: case REF_SOFT:
@ -257,7 +257,7 @@ void VID_MenuInit( void){
sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE); sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE);
if( !_windowed_mouse) if( !_windowed_mouse)
_windowed_mouse = Cvar_Get( "_windowed_mouse", "0", CVAR_ARCHIVE); _windowed_mouse = Cvar_Get( "_windowed_mouse", "1", CVAR_ARCHIVE);
s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value; s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value;
s_mode_list[OPENGL_MENU].curvalue = gl_mode->value; s_mode_list[OPENGL_MENU].curvalue = gl_mode->value;
@ -352,16 +352,23 @@ void VID_MenuInit( void){
s_fs_box[i].itemnames = yesno_names; s_fs_box[i].itemnames = yesno_names;
s_fs_box[i].curvalue = vid_fullscreen->value; s_fs_box[i].curvalue = vid_fullscreen->value;
s_windowed_mouse[i].generic.type = MTYPE_SPINCONTROL;
s_windowed_mouse[i].generic.x = 0;
s_windowed_mouse[i].generic.y = (i == SOFTWARE_MENU ? 70 : 80);
s_windowed_mouse[i].generic.name = "windowed mouse";
s_windowed_mouse[i].curvalue = _windowed_mouse->value;
s_windowed_mouse[i].itemnames = yesno_names;
s_defaults_action[i].generic.type = MTYPE_ACTION; s_defaults_action[i].generic.type = MTYPE_ACTION;
s_defaults_action[i].generic.name = "reset to default"; s_defaults_action[i].generic.name = "reset to default";
s_defaults_action[i].generic.x = 0; s_defaults_action[i].generic.x = 0;
s_defaults_action[i].generic.y = 90; s_defaults_action[i].generic.y = (i == SOFTWARE_MENU ? 90 : 100);
s_defaults_action[i].generic.callback = ResetDefaults; s_defaults_action[i].generic.callback = ResetDefaults;
s_apply_action[i].generic.type = MTYPE_ACTION; s_apply_action[i].generic.type = MTYPE_ACTION;
s_apply_action[i].generic.name = "apply"; s_apply_action[i].generic.name = "apply";
s_apply_action[i].generic.x = 0; s_apply_action[i].generic.x = 0;
s_apply_action[i].generic.y = 100; s_apply_action[i].generic.y = (i == SOFTWARE_MENU ? 100 : 110);
s_apply_action[i].generic.callback = ApplyChanges; s_apply_action[i].generic.callback = ApplyChanges;
} }
@ -372,13 +379,6 @@ void VID_MenuInit( void){
s_stipple_box.curvalue = sw_stipplealpha->value; s_stipple_box.curvalue = sw_stipplealpha->value;
s_stipple_box.itemnames = yesno_names; s_stipple_box.itemnames = yesno_names;
s_windowed_mouse.generic.type = MTYPE_SPINCONTROL;
s_windowed_mouse.generic.x = 0;
s_windowed_mouse.generic.y = 72;
s_windowed_mouse.generic.name = "windowed mouse";
s_windowed_mouse.curvalue = _windowed_mouse->value;
s_windowed_mouse.itemnames = yesno_names;
s_tq_slider.generic.type = MTYPE_SLIDER; s_tq_slider.generic.type = MTYPE_SLIDER;
s_tq_slider.generic.x = 0; s_tq_slider.generic.x = 0;
s_tq_slider.generic.y = 60; s_tq_slider.generic.y = 60;
@ -400,7 +400,9 @@ void VID_MenuInit( void){
Menu_AddItem( &s_software_menu,( void *) &s_brightness_slider[SOFTWARE_MENU]); Menu_AddItem( &s_software_menu,( void *) &s_brightness_slider[SOFTWARE_MENU]);
Menu_AddItem( &s_software_menu,( void *) &s_fs_box[SOFTWARE_MENU]); Menu_AddItem( &s_software_menu,( void *) &s_fs_box[SOFTWARE_MENU]);
Menu_AddItem( &s_software_menu,( void *) &s_stipple_box); Menu_AddItem( &s_software_menu,( void *) &s_stipple_box);
Menu_AddItem( &s_software_menu,( void *) &s_windowed_mouse); Menu_AddItem( &s_software_menu,( void *) &s_windowed_mouse[SOFTWARE_MENU]);
Menu_AddItem( &s_software_menu,( void *) &s_defaults_action[SOFTWARE_MENU]);
Menu_AddItem( &s_software_menu,( void *) &s_apply_action[SOFTWARE_MENU]);
Menu_AddItem( &s_opengl_menu,( void *) &s_ref_list[OPENGL_MENU]); Menu_AddItem( &s_opengl_menu,( void *) &s_ref_list[OPENGL_MENU]);
Menu_AddItem( &s_opengl_menu,( void *) &s_mode_list[OPENGL_MENU]); Menu_AddItem( &s_opengl_menu,( void *) &s_mode_list[OPENGL_MENU]);
@ -409,9 +411,7 @@ void VID_MenuInit( void){
Menu_AddItem( &s_opengl_menu,( void *) &s_fs_box[OPENGL_MENU]); Menu_AddItem( &s_opengl_menu,( void *) &s_fs_box[OPENGL_MENU]);
Menu_AddItem( &s_opengl_menu,( void *) &s_tq_slider); Menu_AddItem( &s_opengl_menu,( void *) &s_tq_slider);
Menu_AddItem( &s_opengl_menu,( void *) &s_paletted_texture_box); Menu_AddItem( &s_opengl_menu,( void *) &s_paletted_texture_box);
Menu_AddItem( &s_opengl_menu,( void *) &s_windowed_mouse[OPENGL_MENU]);
Menu_AddItem( &s_software_menu,( void *) &s_defaults_action[SOFTWARE_MENU]);
Menu_AddItem( &s_software_menu,( void *) &s_apply_action[SOFTWARE_MENU]);
Menu_AddItem( &s_opengl_menu,( void *) &s_defaults_action[OPENGL_MENU]); Menu_AddItem( &s_opengl_menu,( void *) &s_defaults_action[OPENGL_MENU]);
Menu_AddItem( &s_opengl_menu,( void *) &s_apply_action[OPENGL_MENU]); Menu_AddItem( &s_opengl_menu,( void *) &s_apply_action[OPENGL_MENU]);