Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
cc617dc5
Commit
cc617dc5
authored
Mar 16, 2018
by
Rémi Verschelde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCons: properly close files when reading controller mappings
Fixup to #17296.
parent
f17c35b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
SCsub
main/SCsub
+4
-4
default_controller_mappings.h
main/default_controller_mappings.h
+2
-3
No files found.
main/SCsub
View file @
cc617dc5
...
...
@@ -74,10 +74,9 @@ def make_default_controller_mappings(target, source, env):
platform_mappings
=
OrderedDict
()
for
src
in
source
:
src_path
=
src
.
srcnode
()
.
abspath
f
=
open
(
src_path
,
"rb"
)
# read mapping file and skip header
mapping_file_lines
=
f
.
readlines
()[
2
:]
with
open
(
src_path
,
"rb"
)
as
f
:
# read mapping file and skip header
mapping_file_lines
=
f
.
readlines
()[
2
:]
current_platform
=
None
for
line
in
mapping_file_lines
:
...
...
@@ -123,6 +122,7 @@ def make_default_controller_mappings(target, source, env):
g
.
write
(
"#endif
\n
"
)
g
.
write
(
"};
\n
"
)
g
.
close
()
env
.
main_sources
=
[]
env
.
add_source_files
(
env
.
main_sources
,
"*.cpp"
)
...
...
main/default_controller_mappings.h
View file @
cc617dc5
/*************************************************************************/
/*
input_default.h
*/
/*
default_controller_mappings.h
*/
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
...
...
@@ -36,4 +36,4 @@ public:
static
const
char
*
mappings
[];
};
#endif // DEFAULT_CONTROLLER_MAPPINGS_H
\ No newline at end of file
#endif // DEFAULT_CONTROLLER_MAPPINGS_H
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