Am Mittwoch, 4. Mai 2005 20:44 schrieb Lionel Ulmer:
This should fix the mouse issue in S3.
Lionel
Changelog:
- do not flush the buffer when the application only wants to peek the
number of elements in the queue
- trace the GetDeviceState values before they are reset
No, saidly, it doesn't. I have attached a +dinput log again.
Stefan
On Thu, May 05, 2005 at 10:42:55AM +0000, Stefan Dösinger wrote:
No, saidly, it doesn't. I have attached a +dinput log again.
This is really strange as the behaviour of DInput seems fine in my log. Could you send me another log with the attached patch ?
By the way, what exactly is the issue ? The in-game cursor not working or having still the X cursor displayed which is continuously warping back to the middle of the screen ?
Lionel
PS: if anyone knows where I could download the S3 demo, I would be happy to test on my box.
Am Donnerstag, 5. Mai 2005 09:38 schrieb Lionel Ulmer:
On Thu, May 05, 2005 at 10:42:55AM +0000, Stefan Dösinger wrote:
No, saidly, it doesn't. I have attached a +dinput log again.
This is really strange as the behaviour of DInput seems fine in my log. Could you send me another log with the attached patch ?
Log is attached
By the way, what exactly is the issue ? The in-game cursor not working or having still the X cursor displayed which is continuously warping back to the middle of the screen ?
The game seems to use the X cursor, which is continuously warped back. The cursor can be moved a little bit(~1 cm) if I move the mouse fast, but it immediatly warps back to the window center.
Stefan
The game seems to use the X cursor, which is continuously warped back. The cursor can be moved a little bit(~1 cm) if I move the mouse fast, but it immediatly warps back to the window center.
Thanks for the log, but except for the timestamp and sequence number which I find a bit strange (will have to investigate on Windows), it looks perfectly OK.
As the cursor itself, what is the shape of the X cursor ? Is it the normal one or is it changed by the application ? I would be really surprised if the application did use the 'normal' cursor and did not do it itself using DirectX.
It could be confirmed by the screenshots I found on the web when one does not see any cursor drawn on the screen. Did you test this game on Windows to see how the cursor looks like ?
Finally, could you send me a +ddraw,+dinput,+cursor log so that I can reproduce this on my test box and see if the 'normal' mouse cursor stays on screen or if it is hidden by either DDraw or DInput.
Thanks, Lionel
As the cursor itself, what is the shape of the X cursor ? Is it the normal one or is it changed by the application ? I would be really surprised if the application did use the 'normal' cursor and did not do it itself using DirectX.
It doesn't look like the normal X cursor. S3 changes the cursor the same way in Wine as it does on Windows, but I think, appart of it's look that it's the normal X cursor / the normal Windows GDI cursor.
It could be confirmed by the screenshots I found on the web when one does not see any cursor drawn on the screen. Did you test this game on Windows to see how the cursor looks like ?
I could send you a Screenshot, but strangely the cursor isn't visible on the screen shot. I played this game on Windows, and I didn't notice any difference in how the cursor looks.
Finally, could you send me a +ddraw,+dinput,+cursor log so that I can reproduce this on my test box and see if the 'normal' mouse cursor stays on screen or if it is hidden by either DDraw or DInput.
The log is attached.
A demo is available at http://www.siedler3.de/gindex.htm (Direct Link to English Version: ftp://ftp.bluebyte.com/demos/eng/settlers3/s3multidemoeng.exe) I don't know if this Demo works with Wine. The original S3 does a lot of checks on system dlls and such, which causes the game to refuse to run on Windows XP and Wine. Bluebyte has published a modified s3.exe which makes the game start on Windows 2K, Windows XP and (as a side effect) with Wine. I don't know how the demo behaves.
S3 has two other issues: Drawing is slow with wine versions later than 20040914, and S3 requests it's Window with the WS_CAPTION and the ddraw DDSCL_FULLSCREEN flag set. That causes Wine to reserve space for a caption around the window. I have a patch which filters the WS_CAPTION flag in Main_DirectDraw_SetCooperativeLevel. I didn't figure out how Windows handles this, I just know that doing so is not 100% correct.
Stefan
It doesn't look like the normal X cursor. S3 changes the cursor the same way in Wine as it does on Windows, but I think, appart of it's look that it's the normal X cursor / the normal Windows GDI cursor.
trace:dinput:SysMouseAImpl_SetCooperativeLevel (this=0x77c55f18,0x0008004c,0x00000006) trace:dinput:SysMouseAImpl_SetCooperativeLevel cooperative level : DISCL_FOREGROUND DISCL_NONEXCLUSIVE -----------^
And this means that the mouse cursor will NOT be hidden by DInput. So S3 really uses the standard GDI cursor at the same time than DInput.
This means that one (hacky) way to fix your issue would be to disable mouse warping as soon as 'NONEXCLUSIVE' is given AND that the application did not hide the mouse cursor itself. After, one just needs to hope the application did not resort to setting an 'empty' mouse cursor :-)
I wanted first to work on the real fix but as no-one answered my mail on the XOrg list yet, I will maybe do the 'hacky' patch described above waiting for things to move on the X11 side.
I don't know if this Demo works with Wine. The original S3 does a lot of checks on system dlls and such, which causes the game to refuse to run on Windows XP and Wine. Bluebyte has published a modified s3.exe which makes the game start on Windows 2K, Windows XP and (as a side effect) with Wine. I don't know how the demo behaves.
Nope it does not work in Wine and neither does it on WinXP. But it works fine in Win98 + QEMU :-)
Lionel
trace:dinput:SysMouseAImpl_SetCooperativeLevel (this=0x77c55f18,0x0008004c,0x00000006) trace:dinput:SysMouseAImpl_SetCooperativeLevel cooperative level : DISCL_FOREGROUND DISCL_NONEXCLUSIVE -----------^
And this means that the mouse cursor will NOT be hidden by DInput. So S3 really uses the standard GDI cursor at the same time than DInput.
This means that one (hacky) way to fix your issue would be to disable mouse warping as soon as 'NONEXCLUSIVE' is given AND that the application did not hide the mouse cursor itself. After, one just needs to hope the application did not resort to setting an 'empty' mouse cursor :-)
I wanted first to work on the real fix but as no-one answered my mail on the XOrg list yet, I will maybe do the 'hacky' patch described above waiting for things to move on the X11 side.
Well, now we know at least what's going wrong.
I don't know if this Demo works with Wine. The original S3 does a lot of checks on system dlls and such, which causes the game to refuse to run on Windows XP and Wine. Bluebyte has published a modified s3.exe which makes the game start on Windows 2K, Windows XP and (as a side effect) with Wine. I don't know how the demo behaves.
Nope it does not work in Wine and neither does it on WinXP. But it works fine in Win98 + QEMU :-)
Interesting. The full version didn't work for me.(Win95 + qemu and WinXP + Qemu). What qemu version do you use?
Many thanks for your help so far. Stefan
Interesting. The full version didn't work for me.(Win95 + qemu and WinXP + Qemu). What qemu version do you use?
Well, I use a REALLY old QEMU version from CVS (my binary is from July 2004 :-) ). It works fine for my images so I never bothered to upgrade since then.
Lionel
Am Samstag, 7. Mai 2005 19:30 schrieb Lionel Ulmer:
It doesn't look like the normal X cursor. S3 changes the cursor the same way in Wine as it does on Windows, but I think, appart of it's look that it's the normal X cursor / the normal Windows GDI cursor.
trace:dinput:SysMouseAImpl_SetCooperativeLevel (this=0x77c55f18,0x0008004c,0x00000006) trace:dinput:SysMouseAImpl_SetCooperativeLevel cooperative level : DISCL_FOREGROUND DISCL_NONEXCLUSIVE -----------^
And this means that the mouse cursor will NOT be hidden by DInput. So S3 really uses the standard GDI cursor at the same time than DInput.
Just an update:
I just noticed that S3 has a registry setting called "GDIMouse". This setting is reflected by the "use colored mouse pointer(if possible)" / "use monochrome mouse pointer" settings. ("Benutze farbigen Mauszeiger(wenn möglich)" and "Benutze monochrimen Mauszeiger" in my German version). Changing this Setting has no effect on S3 in Wine. I suppose S3 fails to draw its own mouse pointer in Wine and falls back to the GDI one.
I don't know why I didn't notice this earlier
I just noticed that S3 has a registry setting called "GDIMouse". This setting is reflected by the "use colored mouse pointer(if possible)" / "use monochrome mouse pointer" settings. ("Benutze farbigen Mauszeiger(wenn möglich)" and "Benutze monochrimen Mauszeiger" in my German version). Changing this Setting has no effect on S3 in Wine. I suppose S3 fails to draw its own mouse pointer in Wine and falls back to the GDI one.
In that case, you need to do a +dinput,+cursor,+ddraw,+event trace to see if it puts DInput in 'EXCLUSIVE' mode and also if there are no cursor calls once the game starts (as there is no need to change the GDI cursor if the game is using its own).
Lionel
Am Samstag, 7. Mai 2005 20:46 schrieb Lionel Ulmer:
I just noticed that S3 has a registry setting called "GDIMouse". This setting is reflected by the "use colored mouse pointer(if possible)" / "use monochrome mouse pointer" settings. ("Benutze farbigen Mauszeiger(wenn möglich)" and "Benutze monochrimen Mauszeiger" in my German version). Changing this Setting has no effect on S3 in Wine. I suppose S3 fails to draw its own mouse pointer in Wine and falls back to the GDI one.
In that case, you need to do a +dinput,+cursor,+ddraw,+event trace to see if it puts DInput in 'EXCLUSIVE' mode and also if there are no cursor calls once the game starts (as there is no need to change the GDI cursor if the game is using its own).
Well I've attached another log if you're interested, but I looked at it and S3 still puts Dinput in NONEXCLUSIVE mode. The ddraw mouse pointer causes a Blue Screen of Death on my brothers Notebook(win2k), so I'd consider it somewhat broken.
I just installed S3 in qemu 0.7.0 + win95, it doesn't bail out with a illegal instruction any more, but the copy protection seems to be broken, the game can't find the CD.
Stefan