diff options
author | Ariel Manzur <ariel@godotengine.org> | 2018-01-24 19:06:35 -0300 |
---|---|---|
committer | Ariel Manzur <ariel@godotengine.org> | 2018-01-24 19:12:54 -0300 |
commit | 81426ff0a84b0b7f9c52f6f908fe30bec538fa8b (patch) | |
tree | 75ea0bee44c5fb37e12483cd423c0fc0376b565e | |
parent | 81d7b015967655ff724f0a11d9262e6bd4166c98 (diff) |
- Improves portability in joystick buttons enum
- Fixes linking bug in modules split library
-rw-r--r-- | core/os/input_event.h | 4 | ||||
-rw-r--r-- | methods.py | 21 | ||||
-rw-r--r-- | modules/SCsub | 2 |
3 files changed, 17 insertions, 10 deletions
diff --git a/core/os/input_event.h b/core/os/input_event.h index 72057659d2..ad754d0d1f 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -110,8 +110,8 @@ enum JoystickList { JOY_WII_C = JOY_BUTTON_5, JOY_WII_Z = JOY_BUTTON_6, - JOY_WII_MINUS = JOY_BUTTON_9, - JOY_WII_PLUS = JOY_BUTTON_10, + JOY_WII_MINUS = JOY_BUTTON_10, + JOY_WII_PLUS = JOY_BUTTON_11, // end of history diff --git a/methods.py b/methods.py index a8f1fb8a5d..a1ec93bfc1 100644 --- a/methods.py +++ b/methods.py @@ -1477,7 +1477,7 @@ def use_windows_spawn_fix(self, platform=None): self['SPAWN'] = mySpawn -def split_lib(self, libname): +def split_lib(self, libname, src_list = None, env_lib = None): import string env = self @@ -1487,7 +1487,13 @@ def split_lib(self, libname): list = [] lib_list = [] - for f in getattr(env, libname + "_sources"): + if src_list == None: + src_list = getattr(env, libname + "_sources") + + if type(env_lib) == type(None): + env_lib = env + + for f in src_list: fname = "" if type(f) == type(""): fname = env.File(f).path @@ -1497,26 +1503,27 @@ def split_lib(self, libname): base = string.join(fname.split("/")[:2], "/") if base != cur_base and len(list) > max_src: if num > 0: - lib = env.add_library(libname + str(num), list) + lib = env_lib.add_library(libname + str(num), list) + print("adding library ", libname, num) lib_list.append(lib) list = [] num = num + 1 cur_base = base list.append(f) - lib = env.add_library(libname + str(num), list) + lib = env_lib.add_library(libname + str(num), list) lib_list.append(lib) if len(lib_list) > 0: import os, sys if os.name == 'posix' and sys.platform == 'msys': env.Replace(ARFLAGS=['rcsT']) - lib = env.add_library(libname + "_collated", lib_list) + lib = env_lib.add_library(libname + "_collated", lib_list) lib_list = [lib] lib_base = [] - env.add_source_files(lib_base, "*.cpp") - lib = env.add_library(libname, lib_base) + env_lib.add_source_files(lib_base, "*.cpp") + lib = env_lib.add_library(libname, lib_base) lib_list.insert(0, lib) env.Prepend(LIBS=lib_list) diff --git a/modules/SCsub b/modules/SCsub index 7a467676cd..74a5267355 100644 --- a/modules/SCsub +++ b/modules/SCsub @@ -18,7 +18,7 @@ for x in env.module_list: SConscript(x + "/SCsub") if env.split_modules: - env.split_lib("modules") + env.split_lib("modules", env_lib = env_modules) else: lib = env_modules.add_library("modules", env.modules_sources) |