mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 22:44:30 -04:00
config settings for mouse acceleration (#312)
* config settings for mouse acceleration * fix type * use percent
This commit is contained in:
parent
bbb9e01293
commit
fd8781bad6
@ -746,8 +746,9 @@ void I_GetEvent(void)
|
|||||||
// This is to combine all mouse movement for a tic into one mouse
|
// This is to combine all mouse movement for a tic into one mouse
|
||||||
// motion event.
|
// motion event.
|
||||||
|
|
||||||
static const float mouse_acceleration = 1.0; // 2.0;
|
static float mouse_acceleration = 1.0; // 2.0;
|
||||||
static const int mouse_threshold = 0; // 10;
|
int cfg_mouse_acceleration;
|
||||||
|
int mouse_threshold; // 10;
|
||||||
|
|
||||||
static int AccelerateMouse(int val)
|
static int AccelerateMouse(int val)
|
||||||
{
|
{
|
||||||
@ -1270,6 +1271,8 @@ static void I_InitGraphicsMode(void)
|
|||||||
if(firsttime)
|
if(firsttime)
|
||||||
{
|
{
|
||||||
I_InitKeyboard();
|
I_InitKeyboard();
|
||||||
|
// translate config value (as percent) to float
|
||||||
|
mouse_acceleration = (float)cfg_mouse_acceleration / 100;
|
||||||
firsttime = false;
|
firsttime = false;
|
||||||
|
|
||||||
if(M_CheckParm("-hires"))
|
if(M_CheckParm("-hires"))
|
||||||
|
@ -84,6 +84,8 @@ extern int cfg_scalefactor; // haleyjd 05/11/09
|
|||||||
extern int cfg_aspectratio; // haleyjd 05/11/09
|
extern int cfg_aspectratio; // haleyjd 05/11/09
|
||||||
extern int fullscreen; // [FG] save fullscren mode
|
extern int fullscreen; // [FG] save fullscren mode
|
||||||
extern boolean flipcorpses; // [crispy] randomly flip corpse, blood and death animation sprites
|
extern boolean flipcorpses; // [crispy] randomly flip corpse, blood and death animation sprites
|
||||||
|
extern int cfg_mouse_acceleration;
|
||||||
|
extern int mouse_threshold;
|
||||||
|
|
||||||
extern char *chat_macros[], *wad_files[], *deh_files[]; // killough 10/98
|
extern char *chat_macros[], *wad_files[], *deh_files[]; // killough 10/98
|
||||||
|
|
||||||
@ -374,6 +376,20 @@ default_t defaults[] = {
|
|||||||
"adjust vertical (y) mouse sensitivity"
|
"adjust vertical (y) mouse sensitivity"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"cfg_mouse_acceleration",
|
||||||
|
(config_t *) &cfg_mouse_acceleration, NULL,
|
||||||
|
{100}, {100,UL}, number, ss_none, wad_no,
|
||||||
|
"adjust mouse acceleration (100% - no acceleration)"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"mouse_threshold",
|
||||||
|
(config_t *) &mouse_threshold, NULL,
|
||||||
|
{0}, {0,UL}, number, ss_none, wad_no,
|
||||||
|
"adjust mouse acceleration threshold"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"sfx_volume",
|
"sfx_volume",
|
||||||
(config_t *) &snd_SfxVolume, NULL,
|
(config_t *) &snd_SfxVolume, NULL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user