Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
10365e94
Commit
10365e94
authored
1 year ago
by
Hanicef
Browse files
Options
Downloads
Patches
Plain Diff
Use DEFAULTDIR instead of hardcoding .srb2
parent
8794e411
No related branches found
No related tags found
1 merge request
!2396
Don't traverse the entire HOME directory to find wads
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dedicated/i_system.c
+3
-3
3 additions, 3 deletions
src/dedicated/i_system.c
src/sdl/i_system.c
+4
-4
4 additions, 4 deletions
src/sdl/i_system.c
with
7 additions
and
7 deletions
src/dedicated/i_system.c
+
3
−
3
View file @
10365e94
...
...
@@ -1433,12 +1433,12 @@ static const char *locateWad(void)
#ifndef NOHOME
// find in $HOME
I_OutputMsg
(
",HOME/
.srb2"
);
I_OutputMsg
(
",HOME/
"
DEFAULTDIR
);
if
((
envstr
=
I_GetEnv
(
"HOME"
))
!=
NULL
)
{
char
*
tmp
=
malloc
(
strlen
(
envstr
)
+
sizeof
(
"/.srb2"
));
char
*
tmp
=
malloc
(
strlen
(
envstr
)
+
sizeof
(
DEFAULTDIR
));
strcpy
(
tmp
,
envstr
);
strcat
(
tmp
,
"/.srb2"
);
strcat
(
tmp
,
DEFAULTDIR
);
SEARCHWAD
(
envstr
);
free
(
tmp
);
}
...
...
This diff is collapsed.
Click to expand it.
src/sdl/i_system.c
+
4
−
4
View file @
10365e94
...
...
@@ -3038,13 +3038,13 @@ static const char *locateWad(void)
}
#ifndef NOHOME
// find in $HOME
/.srb2
I_OutputMsg
(
",HOME/
.srb2"
);
// find in $HOME
I_OutputMsg
(
",HOME/
"
DEFAULTDIR
);
if
((
envstr
=
I_GetEnv
(
"HOME"
))
!=
NULL
)
{
char
*
tmp
=
malloc
(
strlen
(
envstr
)
+
sizeof
(
"/.srb2"
));
char
*
tmp
=
malloc
(
strlen
(
envstr
)
+
sizeof
(
DEFAULTDIR
));
strcpy
(
tmp
,
envstr
);
strcat
(
tmp
,
"/.srb2"
);
strcat
(
tmp
,
DEFAULTDIR
);
SEARCHWAD
(
envstr
);
free
(
tmp
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment