Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MechWarrior 4: Mercenaries Crash #22

Open
voidvoidvoid opened this issue Sep 20, 2023 · 1 comment
Open

MechWarrior 4: Mercenaries Crash #22

voidvoidvoid opened this issue Sep 20, 2023 · 1 comment

Comments

@voidvoidvoid
Copy link

voidvoidvoid commented Sep 20, 2023

Hello,
I have been enjoying this .DLL file for a while, as it allows me to use joysticks in MechWarrior 4: Mercenaries. Normally for modern systems, you have to launch the game with the /gosnojoystick parameter, disabling joystick support, otherwise the game crashes on launch. And what's the point of playing a mech game without joysticks, right?

However, the game experiences crashes using dinputto8 under two circumstances.

  1. You can play any single mission to completion successfully, however the game then crashes when you launch into a second mission.
  2. If you enter the settings menu and try to change your input bindings during a mission, the game will crash.

If I run the game with /gosnojoystick and without using the dinputto8 DLL file, I do not experience these crashes.
I'm not sure if this issue is the game's fault, or if there is something imperfect in the API translation of dinputto8 which is causing the game to crash. I have attached two log files (it looks like the two different types of crashes reference different memory addresses, so they may be different from each other), but please let me know if I can provide any further info. Thanks for maintaining this project, by the way! I was so excited when I found your DLL file and was able to play MW4 with HOTAS controls. This project has brought me literal joy, so kudos to you.

EDIT: I realized that the correct launch parameter is /gosnojoystick, not /gosnojoysticks plural. Edited text to use the correct launch parameter.

MW4 Crash.txt

MW4 Input Binding Crash.txt

@elishacloud
Copy link
Owner

Sorry for not responding sooner. Can you try with the latest release and see if that helps? I put a number of fixes in that could fix this.

Otherwise, I suspect that the issue is related to issue #15. The issue is that DirectInput fails when creating an input effect and returns nullptr because of the failure. The game ignores the failure and tries to access the nullptr anyways and crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants