-
Notifications
You must be signed in to change notification settings - Fork 49
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 Wine plugin "Override DLL" #1152
Conversation
@Zemogiter please try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plata can you please add a reference to the issue/comment this PR fixes?
@@ -3,23 +3,21 @@ const Regedit = include("engines.wine.plugins.regedit"); | |||
module.default = class OverrideDLL { | |||
constructor(wine) { | |||
this.wine = wine; | |||
this.modes = {}; | |||
this.modes = new Map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed a Map
is a better choice here.
|
||
return this; | ||
} | ||
|
||
go() { | ||
let regeditFileContent = `REGEDIT4\n\n[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]\n`; | ||
|
||
Object.entries(this.modes) | ||
.map(([mode, libraries]) => libraries.map(library => [library, mode])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a sidenot, I think the following change would be enough to fix the issue but I agree that your code is more readable:
.flatMap(([mode, libraries]) => libraries.map(library => [library, mode]))
@plata thanks now it works |
see #1151