KEMBAR78
WIN32: Disable libjpeg-turbo SSE usage on Win95 by sluicebox · Pull Request #4662 · scummvm/scummvm · GitHub
Skip to content

Conversation

sluicebox
Copy link
Member

This should fix jpeg decoding crashing on Win95: https://bugs.scummvm.org/ticket/13643

@ccawley2011 and @lephilousophe figured this out, I just wrote it up in a Win95-compatible check. I haven't tested this code on Win95 as I'm not setup to do those builds, but I have tested the environment variable. When it's set, the Journeyman Project demo no longer crashes on Win95 in vmware.

image

@lephilousophe
Copy link
Member

Sadly this doesn't work.
I bet it's because they use getenv which used environment variables defined at startup.
I am trying to find an alternative.

@lephilousophe
Copy link
Member

I managed to make it work using the following snippet.

_tputenv(TEXT("JSIMD_FORCE3DNOW=1"));

Indeed, according to MSDN, the environment is loaded at startup and is then independent from the OS provided one.

@sluicebox
Copy link
Member Author

Thanks for testing! Updated to use _tputenv

Copy link
Member

@lephilousophe lephilousophe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with your changes and it works flawlessly.

@sluicebox
Copy link
Member Author

Great, thanks for figuring all of this out!

@sluicebox sluicebox merged commit 7c2ff36 into scummvm:master Jan 26, 2023
@sluicebox sluicebox deleted the win95-jpeg branch January 26, 2023 22:10
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

Successfully merging this pull request may close these issues.

2 participants