Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
b3a1790c
Commit
b3a1790c
authored
Dec 20, 2016
by
Jonathan Wilkes
Browse files
partial fix for midi prefs not getting saved under Windows
parent
82190697
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/nw/dialog_prefs.html
View file @
b3a1790c
...
...
@@ -345,7 +345,7 @@ function dev_change(elem) {
index
=
+
(
id
.
slice
(
-
1
))
-
1
;
attrs
=
get_attr
(
"
pd-
"
+
direction
+
type
,
midi
?
pd_midi_attrs
:
pd_audio_attrs
);
attrs
[
index
]
=
midi
?
+
elem
.
value
+
1
:
elem
.
value
;
attrs
[
index
]
=
elem
.
value
;
disable_unused_chans
(
"
in
"
);
disable_unused_chans
(
"
out
"
);
...
...
@@ -537,14 +537,14 @@ function populate_midi_devs(type, attrs) {
while
(
elem
.
firstChild
)
{
elem
.
removeChild
(
elem
.
firstChild
);
}
// make a dummy device named 'None' with value
-1
// make a dummy device named 'None' with value
0
opt
=
document
.
createElement
(
"
option
"
);
opt
.
value
=
-
1
;
opt
.
value
=
0
;
opt
.
textContent
=
"
None
"
;
elem
.
appendChild
(
opt
);
for
(
j
=
0
;
j
<
dev_names
.
length
;
j
++
)
{
opt
=
document
.
createElement
(
"
option
"
);
opt
.
value
=
j
;
opt
.
value
=
j
+
1
;
opt
.
textContent
=
dev_names
[
j
];
elem
.
appendChild
(
opt
);
}
...
...
@@ -685,6 +685,8 @@ function midi_prefs_callback(attrs) {
.
style
.
setProperty
(
"
display
"
,
"
none
"
);
populate_midi_devs
(
"
in
"
,
attrs
);
populate_midi_devs
(
"
out
"
,
attrs
);
set_devs
(
"
midi_in
"
,
get_attr
(
"
pd-indevs
"
,
attrs
));
set_devs
(
"
midi_out
"
,
get_attr
(
"
pd-outdevs
"
,
attrs
));
}
pdgui
.
resize_window
(
pd_object_callback
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment