[resolved] Mouse locking gives strange results

General information and assistance with DOSBox.

[resolved] Mouse locking gives strange results

Postby ulfschaper » 2007-9-20 @ 21:40

Hey everybody!

Since I bought a new computer I have some trouble with my beloved DOSBox: The mouse locking ain't working no more, at least the mouse's X axis.

If I start the games without a lock, everything works fine (besides the cursor moving out of the window). However, once I press Ctrl+F10 to enable the mouse lock, strange things happen:

- in The Settlers, the cursor jumps to the right-hand-side of the screen. I can perfectly move the cursor up and down, but the X-Axis seems to be completely dead, I can't get the cursor away from the right edge of the screen.

- in Duke Nukem 3D something similar happens once MouseLock is on: The Y-Axis (say, up and down) works as it should, but the X-Axis always makes me turn right whenever I touch the mouse. So, if I do nothing then it stands still, but if I try to turn left then the game turns right instead. (But it's not inverted, so if I try to turn right then he will also turn right.)

Does anyone have an idea?
Thank you for any hints!

Ulf Schaper

My system:
AMD64 Gentoo Linux, stable.
xorg 7.2 Dualhead (xinerama)
dosbox 0.7
Optical IntelliMouse Explorer V1, xorg-driver "mouse"
Linux 2.6.22 (gentoo-sources)

And to be complete:
Asus P5B Deluxe Wifi AP
Intel Core2Duo E6600
2GB DDR2 RAM
Matrox MGA G450 PCI & some cheap ATI PCIe card
Last edited by ulfschaper on 2007-9-21 @ 08:06, edited 1 time in total.
ulfschaper
Newbie
 
Posts: 3
Joined: 2007-9-19 @ 18:16

Re: Mouse locking gives strange results

Postby simonecuttlefish » 2007-9-20 @ 23:45

Outrageous and silly things to try in linux when the mouse goes weird (I've had it as well)

1) Filthy ugly but can work (in freebsd with xorg 7.2 and dbox 7.1): In the Dosbox.conf file change sensitivity=100 to sensitivity=270, or even higher

and/or

2) In the Dosbox.conf file change autolock=true to autolock=false

and/or

3) Swap your USB mouse (if you are using one) for a PS2 one - this has NOTHING to do with DOS USB support : ) But it has everything to do with XORG and some of it's mouse setup - you may need to tell XORG you have a new PS2 mouse.


Hopefully someone will come in with a real solution.

I hope any of this helps. Sorry for all the edits : )
Last edited by simonecuttlefish on 2007-9-20 @ 23:52, edited 3 times in total.
simonecuttlefish
Newbie
 
Posts: 23
Joined: 2007-9-13 @ 01:39

Re: Mouse locking gives strange results

Postby `Moe` » 2007-9-20 @ 23:48

Sorry to be so unproductive, but having a dual-head AMD64 Gentoo Linux system (regular mouse driver, ATI graphics as well) myself, I am sorry to say that it works for me. Settlers work fine, and I use the linux port of duke3d (available in gentoo, but a bit difficult to get compiled on 64-bit).

Do you really use 0.7? There is 0.72 already, with DOSBox it's always worth testing the very latest version. It is way faster on 64-bit anyways.
User avatar
`Moe`
Oldbie
 
Posts: 1169
Joined: 2004-4-29 @ 01:06
Location: Oldenburg, Germany

Re: Mouse locking gives strange results

Postby Qbix » 2007-9-21 @ 06:39

don't run unclutter
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Mouse locking gives strange results

Postby ulfschaper » 2007-9-21 @ 07:47

Okay, thanks so far for your hints!

@simonecuttlefish:
Changing the sensitivity just made the cursor faster. I've had changed the Autolock entry to false before (to make DOSBox launch in a usable state).
I've put some green USB-to-PS2 adaptor between my computer and my mouse, so it should be a PS/2-mouse right now. Unfortunately this doesn't resolve my problem. Thank you anyway for your ideas!

@Moe:
I've now upgraded to 0.72, and this really changed something: the Y-Axis is now also affected, my cursor wants to go to the lower-right-corner of the screen right. UPDATE: This is not related to 0.72, more on the bottom of the post.
[Once I'm done with this I'll ask you how you manage to run duke3d natively, I'm stuck with the "Not enough memory for file grouping system" message.]

@Qbix:
I don't have unclutter running, I don't even have it installed. Running processes:
init, udev, acpid, syslog-ng, atd, cupsd, openvpn, ntpd, sshd, cron, login->bash->startx->xinit->(X,fluxbox), agetty, bonobo-activation-server, xbindkeys (I've just shut this one down, doesn't help), gnome-terminal, another bash, gnome-pty-helper and gconfd.

EDIT:
I just found out something interesting:
If I have the DOSBox-window on my right screen and then lock the mouse, only the X-Axis is experiencing this problem. However, if I move the DOSBox-window to the left screen, both axes are affected.
My xorg.conf says:
Screen "Screen 0"
Screen "Screen 1" LeftOf "Screen 0"
where "Screen 1" is on the cheap ATI Radeon X300 (RV370) (ati-driver) and "Screen 0" on my MGA G450 (mga-driver).
ulfschaper
Newbie
 
Posts: 3
Joined: 2007-9-19 @ 18:16

Re: Mouse locking gives strange results

Postby ulfschaper » 2007-9-21 @ 08:06

I found the problem. It's the arrangement of the Screens. My xorg.conf now says:
Screen "Screen 1"
Screen "Screen 0" RightOf "Screen 1"
And this works.

Thank you for your ideas, you made me find the right way!

Qbix: Maybe DOSBox has some inconsistency with negative cursor positions?
ulfschaper
Newbie
 
Posts: 3
Joined: 2007-9-19 @ 18:16

Re: [resolved] Mouse locking gives strange results

Postby Qbix » 2007-9-21 @ 08:10

@ulfschaper: this is possible. DOSBox hasn't been created with 2 monitor setups in mind.
(and negative cursor positions are 2 monitors setup only I think)
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: [resolved] Mouse locking gives strange results

Postby `Moe` » 2007-9-21 @ 11:18

Actually, you should use a "LeftOf"/"RightOf" clause on both screen declarations. At least that's what the man page says.

QBix: DOSBox in general doesn't have problems with dual-head. Been using such a setup for years without problems, even on triple-head setups.
User avatar
`Moe`
Oldbie
 
Posts: 1169
Joined: 2004-4-29 @ 01:06
Location: Oldenburg, Germany

Re: [resolved] Mouse locking gives strange results

Postby Qbix » 2007-10-30 @ 10:26

pinned as it seems to be happening a lot lately
I wonder if distro's configure dual monitor setups correctly nowadays
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: [resolved] Mouse locking gives strange results

Postby Amros » 2007-11-28 @ 14:58

Hello there :)

I have somewhat the same problem. I to run dosbox on linux, and whenever i try to lock the mouse using Ctrl+F10 the cursor is stuck. In my case the cursor is stuck in the lower right corner of the screen.

I'm not trying to run this on two monitors, only one.

After I changed the autolock=true to autolock=false the mouse behaves while in window-mode, but fullscreen is another story.

I tried adjusting up the mouse-sensitivity, but this did not help. I also have no PS2-port on my computer, so i am stuck using my usb-mouse.

As I am quite new to the whole dos-emulation thing, I really do not know what to do. Any help would be great.

Regards, Amros
Amros
Newbie
 
Posts: 1
Joined: 2007-11-28 @ 14:15
Location: Norway

Re: [resolved] Mouse locking gives strange results

Postby sallyxi » 2008-6-02 @ 15:04

General speaking,such problem can not be happening on new computer,sounds bizzare.
sallyxi
Newbie
 
Posts: 3
Joined: 2008-5-25 @ 06:10

Re: [resolved] Mouse locking gives strange results

Postby Binary » 2008-8-06 @ 23:06

Hi folks,

I just found this topic and I'm having the same issue. I have a dual monitor configuration on Linux and I used to have the main one on the LEFT of the secondary one - and DOSBox worked fine

Now I've moved the main monitor to the RIGHT of the secondary one and the mouse in DOSBox is behaving erratically, as explained by the OP

My xorg.conf has:

screen 0 "Screen0" 0 0
screen 1 "screen1" leftof "Screen0"

If I change this by putting the screen 1 line first or using screen1 rightof screen1, X starts displaying same image on both monitors.

Any ideas? Please?
Thanks in advance
--
So long, and thanks for all the fish.
Binary
Newbie
 
Posts: 8
Joined: 2002-11-27 @ 11:21

Re: [resolved] Mouse locking gives strange results

Postby Qbix » 2008-8-07 @ 06:26

think you need something like
screen 0 "screen0" rightof "screen1"
(you need both right and left in the configfile)
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: [resolved] Mouse locking gives strange results

Postby Binary » 2008-8-07 @ 07:42

Thanks but I tried that as well and all I got was both screen showing the same :(

Fortunately during my search I found something here that seems to solve this issue:

http://lovehateubuntu.blogspot.com/2008 ... buntu.html

"[...]create a script like this in your dosbox folder:

#!/bin/bash
export SDL_VIDEO_X11_DGAMOUSE=0
dosbox


Save it and then make it executable (either by using chmod, or right-click the file, go to Properties, choose the Permissions tab, and check "Allow executing the file as program). Now, whenever you want to run DosBox, you just run this instead of the normal dosbox executable."

Although this workaround is useful, I think this issue is definitely a DOSBox bug
--
So long, and thanks for all the fish.
Binary
Newbie
 
Posts: 8
Joined: 2002-11-27 @ 11:21

Re: [resolved] Mouse locking gives strange results

Postby wd » 2008-8-07 @ 09:50

I think this issue is definitely a DOSBox bug

I think this issue is definitely NO dosbox bug. Just browse the net a bit
for SDL_VIDEO_X11_DGAMOUSE how many issues it solves (ie. almost
every SDL application together with that special xorg combination).
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: [resolved] Mouse locking gives strange results

Postby Binary » 2008-8-07 @ 13:04

Look at it from a simple point of view. All my X applications work regardless of whether I have monitor 0 or 1 on the left. DOSBox is the only one that doesn't.

So there may be others out there, I don't know. Still how hard would it be for DOSBox to work with a pretty normal and well configured X configuration?

Just my 2c :)
--
So long, and thanks for all the fish.
Binary
Newbie
 
Posts: 8
Joined: 2002-11-27 @ 11:21

Re: [resolved] Mouse locking gives strange results

Postby wd » 2008-8-07 @ 13:54

See above.

Still how hard would it be for DOSBox to work with a pretty normal and well configured X configuration?

Feel free to try it. Other SDL apps don't fix it either but just automatically
set that env variable to look like everything is fine.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: [resolved] Mouse locking gives strange results

Postby MiniMax » 2008-8-07 @ 15:06

@wd - puritanism is fine, but since DOSBox is already (on Windows at least) using a tweaked version of SDL, would it be so horrible to have DOSBox on Linux tweak the installed SDL by setting an environment variable?
DOSBox 0.73 ReadMe | DOSBox Wiki | DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Win 10 Pro
User avatar
MiniMax
Moderator
 
Posts: 5128
Joined: 2004-1-18 @ 04:15
Location: Stockholm, Sweden, Europe, Earth Interests: Old games & young women

Re: [resolved] Mouse locking gives strange results

Postby Qbix » 2008-8-07 @ 16:53

well we allready do that for linux for some things.
However I don't know of the side effects of that define. First time I hear about it.
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10375
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: [resolved] Mouse locking gives strange results

Postby wd » 2008-8-07 @ 18:11

would it be so horrible to have DOSBox on Linux tweak the installed SDL by setting an environment variable?

You don't need to change the SDL installation, it can fully be done inside
dosbox only. But reading the sdl sources this might prevent fast/usable mouse
access under linux, so for those two people who are using that configuration
it doesn't sound sensible.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Next

Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 3 guests