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

Initialize COM only once, globally #7969

Merged
merged 2 commits into from
Jan 10, 2019

Conversation

krzys-h
Copy link
Contributor

@krzys-h krzys-h commented Jan 10, 2019

Description

This removes all calls to CoInitialize/CoUninitialize from drivers and instead inits/deinits only once in main(). It is a common and recommended practice for libraries and components to require the caller to initialize COM for them instead of trying to initialize it yourself.

Also see this stackoverflow question which is the same issue we are having (but without an answer, unfortunately): https://stackoverflow.com/questions/2154151/coinitialize-couninitialize-calls-pairing

Related Issues

#7842

Reviewers

@bparker06 @twinaphex

Apparently MSVC adds this by default or something
@inactive123 inactive123 merged commit 24ce1ae into libretro:master Jan 10, 2019
@krzys-h krzys-h deleted the com-init-is-broken branch January 12, 2019 20:05
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