MCPcopy Create free account
hub / github.com/demoth/jake2 / ApplyChanges

Method ApplyChanges

client/src/main/java/jake2/client/VID.java:400–429  ·  view source on GitHub ↗
( Object unused )

Source from the content-addressed store, hash-verified

398 }
399
400 static void ApplyChanges( Object unused )
401 {
402
403 /*
404 ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3
405 */
406 // the original was modified, because on CRTs it was too dark.
407 // the slider range is [5; 13]
408 // gamma: [1.1; 0.7]
409 float gamma = ( 0.4f - ( s_brightness_slider.curvalue/20.0f - 0.25f ) ) + 0.7f;
410 // modulate: [1.0; 2.6]
411 float modulate = s_brightness_slider.curvalue * 0.2f;
412
413 Cvar.getInstance().SetValue( "vid_gamma", gamma );
414 Cvar.getInstance().SetValue( "gl_modulate", modulate);
415 Cvar.getInstance().SetValue( "gl_picmip", 3 - s_tq_slider.curvalue );
416 Cvar.getInstance().SetValue( "vid_fullscreen", s_fs_box.curvalue );
417 Cvar.getInstance().SetValue( "gl_swapinterval", (int) s_vsync_box.curvalue);
418 // set always true because of vid_ref or mode changes
419 gl_swapinterval.modified = true;
420 Cvar.getInstance().SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue );
421 Cvar.getInstance().SetValue( "gl_mode", s_mode_list.curvalue );
422
423 Cvar.getInstance().Set( "vid_ref", drivers[s_ref_list.curvalue] );
424 Cvar.getInstance().Set( "gl_driver", drivers[s_ref_list.curvalue] );
425 if (gl_driver.modified)
426 vid_ref.modified = true;
427
428 Menu.ForceMenuOff();
429 }
430
431 static final String[] resolutions =
432 {

Callers 1

executeMethod · 0.95

Calls 4

getInstanceMethod · 0.95
ForceMenuOffMethod · 0.95
SetValueMethod · 0.80
SetMethod · 0.80

Tested by

no test coverage detected