It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi all,
Recently I've played doom/doom2 in dosbox, and vertical mouse movement is really painful. I've heard about novert, but it doesn't convince me. Also, some older games has different vertical/horizontal sensitivity (like classic shadow warrior). So I checked dosbox sources and prepared patch for separate vertical/horizontal mouse sensitivity in config.

Now in [sld] section in config You should use xsensitivity/ysensitivity for horizontal and vertical mouse sensitivity, and to disable vertical mouse movement just set ysensitivity to zero.

Link to instructions how to build dosbox:
dosbox.com/wiki/Building_DOSBox_with_MinGW
<< I cannot paste full link (I'm new user and there are some security stuff)>>

And patch below (I can't attach it to post - it seems only images works as attachments, and as I see it's missing formatting now):

Index: src/gui/sdlmain.cpp
===================================================================
--- src/gui/sdlmain.cpp (wersja 1)
+++ src/gui/sdlmain.cpp (wersja 2)
@@ -210,7 +210,8 @@
bool autoenable;
bool requestlock;
bool locked;
- Bitu sensitivity;
+ Bitu x_sensitivity;
+ Bitu y_sensitivity;
} mouse;
SDL_Rect updateRects[1024];
Bitu num_joysticks;
@@ -1088,7 +1089,8 @@
sdl.mouse.autoenable=section->Get_bool("autolock");
if (!sdl.mouse.autoenable) SDL_ShowCursor(SDL_DISABLE);
sdl.mouse.autolock=false;
- sdl.mouse.sensitivity=section->Get_int("sensitivity");
+ sdl.mouse.x_sensitivity=section->Get_int("xsensitivity");
+ sdl.mouse.y_sensitivity=section->Get_int("ysensitivity");
std::string output=section->Get_string("output");

/* Setup Mouse correctly if fullscreen */
@@ -1256,10 +1258,10 @@

static void HandleMouseMotion(SDL_MouseMotionEvent * motion) {
if (sdl.mouse.locked || !sdl.mouse.autoenable)
- Mouse_CursorMoved((float)motion->xrel*sdl.mouse.sensitivity/100.0f,
- (float)motion->yrel*sdl.mouse.sensitivity/100.0f,
- (float)(motion->x-sdl.clip.x)/(sdl.clip.w-1)*sdl.mouse.sensitivity/100.0f,
- (float)(motion->y-sdl.clip.y)/(sdl.clip.h-1)*sdl.mouse.sensitivity/100.0f,
+ Mouse_CursorMoved((float)motion->xrel*sdl.mouse.x_sensitivity/100.0f,
+ (float)motion->yrel*sdl.mouse.y_sensitivity/100.0f,
+ (float)(motion->x-sdl.clip.x)/(sdl.clip.w-1)*sdl.mouse.x_sensitivity/100.0f,
+ (float)(motion->y-sdl.clip.y)/(sdl.clip.h-1)*sdl.mouse.y_sensitivity/100.0f,
sdl.mouse.locked);
}

@@ -1495,10 +1497,14 @@
Pbool = sdl_sec->Add_bool("autolock",Property::Changeable::Always,true);
Pbool->Set_help("Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)");

- Pint = sdl_sec->Add_int("sensitivity",Property::Changeable::Always,100);
- Pint->SetMinMax(1,1000);
- Pint->Set_help("Mouse sensitivity.");
+ Pint = sdl_sec->Add_int("xsensitivity",Property::Changeable::Always,100);
+ Pint->SetMinMax(0,1000);
+ Pint->Set_help("Mouse horizontal sensitivity.");

+ Pint = sdl_sec->Add_int("ysensitivity",Property::Changeable::Always,100);
+ Pint->SetMinMax(0,1000);
+ Pint->Set_help("Mouse vertical sensitivity.");
+
Pbool = sdl_sec->Add_bool("waitonerror",Property::Changeable::Always, true);
Pbool->Set_help("Wait before closing the console if dosbox has an error.");
Post edited May 15, 2018 by K00B
This is interesting! I don't play many shooters, but I have noticed in some games that use Mode 13h and the like (i.e.non-square pixels) the vertical and horizontal movement speeds of the mouse cursor can feel wrong. This would almost certainly allow one to fix that.
Post edited May 15, 2018 by SirPrimalform
This really isn't the best place for DOSBox patches. Post them to the DOSBox sourceforge page or VOGONS:
https://sourceforge.net/projects/dosbox/

The guides on the wiki are old which I'm working on updating:
Check the Google Drive link for the mingw guides and already setup mingw and mingw-w64 environments:

https://www.vogons.org/viewtopic.php?f=31&amp;t=55706
Post edited May 15, 2018 by DosFreak
avatar
DosFreak: This really isn't the best place for DOSBox patches. Post them to the DOSBox sourceforge page or VOGONS:
https://sourceforge.net/projects/dosbox/

The guides on the wiki are old which I'm working on updating:
Check the Google Drive link for the mingw guides and already setup mingw and mingw-w64 environments:

https://www.vogons.org/viewtopic.php?f=31&amp;t=55706
You're right. I've posted patch ticket in sourceforge dosbox project. Also i've found that there was invert mouse feature request, and with separate sensitivity settings it should be really simple to just use negative sensitivity for inverted axis :)

But i'll left this here too, because i think it should work nice as workaround in case it doesn't get into project.
Post edited May 19, 2018 by K00B