Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
purr-data
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aa
purr-data
Commits
1f41004d
Commit
1f41004d
authored
Jul 27, 2017
by
Jonathan Wilkes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'aggraef/purr-data-osx-prefs-fix'
parents
acd148a5
890310eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
pd/src/s_file.c
pd/src/s_file.c
+12
-0
No files found.
pd/src/s_file.c
View file @
1f41004d
...
...
@@ -268,6 +268,8 @@ static char *sys_prefbuf;
// prefs is *much* faster now than with the previous method which invoked
// 'defaults read' on each individual key.
static
int
save_prefs_later
=
0
;
static
void
sys_initloadpreferences
(
void
)
{
char
cmdbuf
[
MAXPDSTRING
],
*
buf
;
...
...
@@ -308,6 +310,8 @@ static void sys_initloadpreferences(void)
// Read from the package defaults and write to the user prefs.
prefs
=
default_prefs
;
strncpy
(
current_prefs
,
user_prefs
,
FILENAME_MAX
);
// AG: Remember to save the prefs later after we loaded them (see below).
save_prefs_later
=
1
;
}
// This looks complicated, but is rather straightforward. The individual
// stages of the pipe are:
...
...
@@ -405,6 +409,14 @@ static void sys_doneloadpreferences( void)
if
(
sys_prefbuf
)
free
(
sys_prefbuf
);
sys_prefbuf
=
NULL
;
if
(
save_prefs_later
)
{
// AG: We need to save the default prefs to the user prefs at this point
// in order to avoid losing them, in case the recent file list is written
// without first saving the defaults (fixes #339).
extern
void
glob_savepreferences
(
t_pd
*
dummy
);
glob_savepreferences
(
NULL
);
save_prefs_later
=
0
;
}
}
// AG: We use a similar approach here to import the data into the defaults
...
...
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