diff options
author | Rafał Mikrut <mikrutrafal@protonmail.com> | 2020-11-24 10:12:55 +0100 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal@protonmail.com> | 2020-12-02 16:09:11 +0100 |
commit | e1811b689b6854668ca690831df8603820b68573 (patch) | |
tree | b13641bf9a704ec71f8ac90f3dd8d41a1174ae04 /platform/linuxbsd/joypad_linux.h | |
parent | d1231be1c8f8f2c16fd1047adcd3c7f997a07c1f (diff) | |
download | redot-engine-e1811b689b6854668ca690831df8603820b68573.tar.gz |
Initialize class/struct variables with default values in platform/ and editor/
Diffstat (limited to 'platform/linuxbsd/joypad_linux.h')
-rw-r--r-- | platform/linuxbsd/joypad_linux.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/platform/linuxbsd/joypad_linux.h b/platform/linuxbsd/joypad_linux.h index 0d175193a5..71eab78f99 100644 --- a/platform/linuxbsd/joypad_linux.h +++ b/platform/linuxbsd/joypad_linux.h @@ -56,17 +56,16 @@ private: Input::JoyAxis curr_axis[MAX_ABS]; int key_map[MAX_KEY]; int abs_map[MAX_ABS]; - int dpad; - int fd; + int dpad = 0; + int fd = -1; String devpath; - input_absinfo *abs_info[MAX_ABS]; + input_absinfo *abs_info[MAX_ABS] = {}; - bool force_feedback; - int ff_effect_id; - uint64_t ff_effect_timestamp; + bool force_feedback = false; + int ff_effect_id = 0; + uint64_t ff_effect_timestamp = 0; - Joypad(); ~Joypad(); void reset(); }; |