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

Fix several issues on windows #6

Merged
merged 2 commits into from
Oct 31, 2023
Merged

Conversation

falkTX
Copy link
Contributor

@falkTX falkTX commented Oct 30, 2023

  • posix named semaphores are not implemented in mingw https://github.com/mirror/mingw-w64/blob/master/mingw-w64-libraries/winpthreads/src/sem.c#L312
  • GetModuleFileName used NULL, which would get the standalone/host path, not the plugin path. we need to get the handle from the DllMain function
  • Also GetModuleFileName was used the ANSI variant, which breaks for any special characters, we should switch to use wide-char API variants
  • getenv on windows does not work as we expect, and also has same ANSI variant issues, prefer to use GetEnvironmentVariableW
  • adjust env var stuff to work for mod-app on windows.

with this the plugin loads without crashes and seems to work as intended even in mod-app. but I didnt test much

Signed-off-by: falkTX <falktx@falktx.com>
Signed-off-by: falkTX <falktx@falktx.com>
@brummer10 brummer10 merged commit 79cc2dc into brummer10:main Oct 31, 2023
@brummer10
Copy link
Owner

Thanks for the fixes!

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