Hi all,
After seeing the reports on cemw of Grim Fandango not working anymore, I decided to check it out. Install worked fine, but the game did not work.
It stopped just after doing a SetCooperativeLevel. After some checkings, the error came from there (file dlls/ddraw/ddraw/main.c) :
HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel(LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel) { (....) if ((This->cooperative_level & DDSCL_EXCLUSIVE) && (cooplevel & DDSCL_EXCLUSIVE)) return DDERR_EXCLUSIVEMODEALREADYSET; (....) }
Grim Fandango did the following : fixme:ddraw:Main_DirectDraw_SetCooperativeLevel (0x4039a090)->(00000138,00000051) - DDSCL_FULLSCREEN DDSCL_ALLOWMODEX DDSCL_EXCLUSIVE (...) fixme:ddraw:Main_DirectDraw_SetCooperativeLevel (0x4039a090)->(00000138,00000011) - DDSCL_FULLSCREEN DDSCL_EXCLUSIVE
I wonder if this test is really needed ? My interpretation of the 'DDERR_EXCLUSIVEMODEALREADYSET' error was that ANOTHER application already used this flag, not that it was already set for the current application.
Anyway, removing this test fixed Grim Fandango. It now starts fine, except for some palette problems.
If you agree, I will submit a patch that removes this test :-)
Lionel
PS: I found out that Grim Fandango eats up my X auto repeat (I need to do a 'xset r on' after)... I thought that this was removed in recent Wine versions ?
Lionel Ulmer wrote:
PS: I found out that Grim Fandango eats up my X auto repeat (I need to do a 'xset r on' after)... I thought that this was removed in recent Wine versions ?
Comment out the pSetKeyboardConfig call in SysKeyboardAImpl_Unacquire as well (dlls/dinput/keyboard/main.c). Currently, it 'restores' the keyboard config to a random value (hmm, probably always zero, but anyway ...) ;-)
Bye, Ulrich
Lionel Ulmer wrote:
It stopped just after doing a SetCooperativeLevel. After some checkings, the error came from there (file dlls/ddraw/ddraw/main.c) :
HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel(LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel) { (....) if ((This->cooperative_level & DDSCL_EXCLUSIVE) && (cooplevel & DDSCL_EXCLUSIVE)) return DDERR_EXCLUSIVEMODEALREADYSET; (....) }
I wonder if this test is really needed ? My interpretation of the 'DDERR_EXCLUSIVEMODEALREADYSET' error was that ANOTHER application already used this flag, not that it was already set for the current application.
Anyway, removing this test fixed Grim Fandango. It now starts fine, except for some palette problems.
If you agree, I will submit a patch that removes this test :-)
I think you're right - I have a recollection of having removed this myself in a local tree that I accidently deleted at some point. I'd say it's good for a check-in.
PS: I found out that Grim Fandango eats up my X auto repeat (I need to do a 'xset r on' after)... I thought that this was removed in recent Wine versions ?
No idea on this - Ove?
-Gav
On Mon, 12 Feb 2001, Lionel Ulmer wrote:
I wonder if this test is really needed ? My interpretation of the 'DDERR_EXCLUSIVEMODEALREADYSET' error was that ANOTHER application already used this flag, not that it was already set for the current application.
I've been wondering about it myself, not sure why Andrew added it.
PS: I found out that Grim Fandango eats up my X auto repeat (I need to do a 'xset r on' after)... I thought that this was removed in recent Wine versions ?
Yes, it was removed from the init code, but I forgot to remove it from the cleanup code, which currently restores keyboard autorepeat from a value that is no longer set in the init... I fixed a while ago in the transgaming tree but have not submitted it to winehq yet, because we'd have to do a merge first, but I've so far held off on doing that because our cvs server was supposed to be moved... (and I still don't have access to the new server for some reason)