diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e8f60ce7e..8e2585acb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ main/gamerend.c, main/multi.c, net_udp.c: Fixed some minor HUD-text related issu main/kmatrix.c: Defer free of kmatrix data until window is fully gone - patch by Kp main/kconfig.c: Added default keys for weapon cycling similar to Descent 2 and reverted default reverse key to Z as default as more convinient for the QUERTY keyboard layout main/inferno.c: Disable fullscreen toggling via ALT+ENTER if Game_wind is on top so toggling cannot be done accidentially ingame +arch/sdl/mouse.c, d1x.ini, include/args.h, main/inferno.c, misc/args.c: Added option to hide mouse cursor (without disabling the mouse completely) 20130103 -------- diff --git a/arch/sdl/mouse.c b/arch/sdl/mouse.c index 2e68081bd..1b7ee5326 100644 --- a/arch/sdl/mouse.c +++ b/arch/sdl/mouse.c @@ -237,7 +237,7 @@ int mouse_get_btns() void mouse_toggle_cursor(int activate) { - Mouse.cursor_enabled = (activate && !GameArg.CtlNoMouse); + Mouse.cursor_enabled = (activate && !GameArg.CtlNoMouse && !GameArg.CtlNoCursor); if (!Mouse.cursor_enabled) SDL_ShowCursor(SDL_DISABLE); } diff --git a/d1x.ini b/d1x.ini index 890011bc3..b3153b4ff 100644 --- a/d1x.ini +++ b/d1x.ini @@ -14,6 +14,7 @@ Controls: +;-nocursor Hide mouse cursor ;-nomouse Deactivate mouse ;-nojoystick Deactivate joystick ;-nostickykeys Make CapsLock and NumLock non-sticky diff --git a/include/args.h b/include/args.h index cbe01e877..1029a5fb9 100644 --- a/include/args.h +++ b/include/args.h @@ -52,6 +52,7 @@ typedef struct Arg int SysNoBorders; int SysAutoDemo; int SysNoTitles; + int CtlNoCursor; int CtlNoMouse; int CtlNoJoystick; int CtlNoStickyKeys; diff --git a/main/inferno.c b/main/inferno.c index 33ab0a8c6..01b96345b 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -114,6 +114,7 @@ void print_commandline_help() printf( " -noborders Do not show borders in window mode\n"); printf( "\n Controls:\n\n"); + printf( " -nocursor Hide mouse cursor\n"); printf( " -nomouse Deactivate mouse\n"); printf( " -nojoystick Deactivate joystick\n"); printf( " -nostickykeys Make CapsLock and NumLock non-sticky\n"); diff --git a/misc/args.c b/misc/args.c index 633543c0c..89179ddab 100644 --- a/misc/args.c +++ b/misc/args.c @@ -146,6 +146,7 @@ void ReadCmdArgs(void) // Control Options + GameArg.CtlNoCursor = FindArg("-nocursor"); GameArg.CtlNoMouse = FindArg("-nomouse"); GameArg.CtlNoJoystick = FindArg("-nojoystick"); GameArg.CtlNoStickyKeys = FindArg("-nostickykeys");