diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-18 19:40:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 19:40:31 +0100 |
commit | 310496a89f583b49217915b9add165d51aea575e (patch) | |
tree | dbd3274dc1208ffe6c4a0ec99be0747f5d2d1cb1 /platform/android/java_godot_io_wrapper.cpp | |
parent | 7eb4e6415d74e3d4dae6ddd12bb0bdb7acf221c0 (diff) | |
parent | 8e128726f0eac1982aa75a005554ee5b556b332e (diff) |
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
Diffstat (limited to 'platform/android/java_godot_io_wrapper.cpp')
-rw-r--r-- | platform/android/java_godot_io_wrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/android/java_godot_io_wrapper.cpp b/platform/android/java_godot_io_wrapper.cpp index 4ee4427aa0..41201db32b 100644 --- a/platform/android/java_godot_io_wrapper.cpp +++ b/platform/android/java_godot_io_wrapper.cpp @@ -187,14 +187,14 @@ String GodotIOJavaWrapper::get_system_dir(int p_dir) { } } -// volatile because it can be changed from non-main thread and we need to +// SafeNumeric because it can be changed from non-main thread and we need to // ensure the change is immediately visible to other threads. -static volatile int virtual_keyboard_height; +static SafeNumeric<int> virtual_keyboard_height; int GodotIOJavaWrapper::get_vk_height() { - return virtual_keyboard_height; + return virtual_keyboard_height.get(); } void GodotIOJavaWrapper::set_vk_height(int p_height) { - virtual_keyboard_height = p_height; + virtual_keyboard_height.set(p_height); } |