diff options
| author | Marcelo Fernandez | 2017-08-17 18:35:55 -0300 |
|---|---|---|
| committer | Marcelo Fernandez | 2017-08-17 19:51:13 -0300 |
| commit | eab850524ead092ed9fe22e57955e59eae373b79 (patch) | |
| tree | 1ec2718c0810d852b51c4d40c135f4dde3841906 /modules | |
| parent | 33c1d25517050470689924c60414feaf295ce05f (diff) | |
| download | godot-eab850524ead092ed9fe22e57955e59eae373b79.tar.gz godot-eab850524ead092ed9fe22e57955e59eae373b79.tar.zst godot-eab850524ead092ed9fe22e57955e59eae373b79.zip | |
Add closest_power_of_2 func and implement mix_rate/latency on OS X
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/etc/image_etc.cpp | 2 | ||||
| -rw-r--r-- | modules/gdscript/gd_functions.cpp | 2 | ||||
| -rw-r--r-- | modules/visual_script/visual_script_builtin_funcs.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp index 353bd1274..ccc1733c4 100644 --- a/modules/etc/image_etc.cpp +++ b/modules/etc/image_etc.cpp @@ -118,7 +118,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f } int imgw = p_img->get_width(), imgh = p_img->get_height(); - ERR_FAIL_COND(nearest_power_of_2(imgw) != imgw || nearest_power_of_2(imgh) != imgh); + ERR_FAIL_COND(next_power_of_2(imgw) != imgw || next_power_of_2(imgh) != imgh); Image::Format etc_format = force_etc1_format ? Image::FORMAT_ETC : _get_etc2_mode(detected_channels); diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index 209bdadd6..094dd287e 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -446,7 +446,7 @@ void GDFunctions::call(Function p_func, const Variant **p_args, int p_arg_count, VALIDATE_ARG_COUNT(1); VALIDATE_ARG_NUM(0); int64_t num = *p_args[0]; - r_ret = nearest_power_of_2(num); + r_ret = next_power_of_2(num); } break; case OBJ_WEAKREF: { VALIDATE_ARG_COUNT(1); diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 203e0bb48..9cbd70d4c 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -915,7 +915,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in VALIDATE_ARG_NUM(0); int64_t num = *p_inputs[0]; - *r_return = nearest_power_of_2(num); + *r_return = next_power_of_2(num); } break; case VisualScriptBuiltinFunc::OBJ_WEAKREF: { |
