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
268
Issues
268
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Wilkes
purr-data
Commits
1f41004d
Commit
1f41004d
authored
Jul 27, 2017
by
Jonathan Wilkes
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'aggraef/purr-data-osx-prefs-fix'
parents
acd148a5
890310eb
Pipeline
#922
failed with stage
in 244 minutes and 19 seconds
Changes
1
Pipelines
2
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
...
...
Albert Gräf
@aggraef
mentioned in issue
#429 (closed)
·
Mar 23, 2018
mentioned in issue
#429 (closed)
mentioned in issue #429
Toggle commit list
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