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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
f55623ef
Commit
f55623ef
authored
Dec 23, 2018
by
Marco Z
Browse files
Options
Downloads
Patches
Plain Diff
Clear all control keys before loading defaults in LoadConfig
parent
71da6836
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!488
Merge in next and don't billboard papersprites in GL
,
!403
Reset default controls for LOADCONFIG command
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/g_input.c
+10
-0
10 additions, 0 deletions
src/g_input.c
src/g_input.h
+1
-0
1 addition, 0 deletions
src/g_input.h
src/m_misc.c
+1
-0
1 addition, 0 deletions
src/m_misc.c
with
12 additions
and
0 deletions
src/g_input.c
+
10
−
0
View file @
f55623ef
...
...
@@ -1010,6 +1010,16 @@ void G_ClearControlKeys(INT32 (*setupcontrols)[2], INT32 control)
setupcontrols
[
control
][
1
]
=
KEY_NULL
;
}
void
G_ClearAllControlKeys
(
void
)
{
INT32
i
;
for
(
i
=
0
;
i
<
num_gamecontrols
;
i
++
)
{
G_ClearControlKeys
(
gamecontrol
,
i
);
G_ClearControlKeys
(
gamecontrolbis
,
i
);
}
}
//
// Returns the name of a key (or virtual key for mouse and joy)
// the input value being an keynum
...
...
This diff is collapsed.
Click to expand it.
src/g_input.h
+
1
−
0
View file @
f55623ef
...
...
@@ -160,6 +160,7 @@ INT32 G_KeyStringtoNum(const char *keystr);
// detach any keys associated to the given game control
void
G_ClearControlKeys
(
INT32
(
*
setupcontrols
)[
2
],
INT32
control
);
void
G_ClearAllControlKeys
(
void
);
void
Command_Setcontrol_f
(
void
);
void
Command_Setcontrol2_f
(
void
);
void
G_Controldefault
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/m_misc.c
+
1
−
0
View file @
f55623ef
...
...
@@ -443,6 +443,7 @@ void Command_LoadConfig_f(void)
FIL_ForceExtension
(
configfile
,
".cfg"
);
// load default control
G_ClearAllControlKeys
();
G_Controldefault
();
// temporarily reset execversion to default
...
...
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