diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-12-08 15:53:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-08 15:53:42 +0100 |
| commit | 90bdba576af2d5f0a8ecdbef065d6ef0075bc2f2 (patch) | |
| tree | 22e25092f8a56af0c467442baa763f7a2db1c7cb /platform/windows | |
| parent | edb3686ee2379ad28d1273797db8bd9ded38ff1e (diff) | |
| parent | e1811b689b6854668ca690831df8603820b68573 (diff) | |
Merge pull request #43742 from qarmin/editor_modules_default_values
Initialize class/struct variables with default values in platform/ and editor/
Diffstat (limited to 'platform/windows')
| -rw-r--r-- | platform/windows/context_gl_windows.cpp | 1 | ||||
| -rw-r--r-- | platform/windows/crash_handler_windows.cpp | 2 | ||||
| -rw-r--r-- | platform/windows/joypad_windows.h | 20 | ||||
| -rw-r--r-- | platform/windows/os_windows.cpp | 5 |
4 files changed, 13 insertions, 15 deletions
diff --git a/platform/windows/context_gl_windows.cpp b/platform/windows/context_gl_windows.cpp index 1c32639a38..54251fc66c 100644 --- a/platform/windows/context_gl_windows.cpp +++ b/platform/windows/context_gl_windows.cpp @@ -211,6 +211,7 @@ ContextGL_Windows::ContextGL_Windows(HWND hwnd, bool p_opengl_3_context) { hWnd = hwnd; use_vsync = false; vsync_via_compositor = false; + pixel_format = 0; } ContextGL_Windows::~ContextGL_Windows() { diff --git a/platform/windows/crash_handler_windows.cpp b/platform/windows/crash_handler_windows.cpp index 7abf451062..0f2f49c5ce 100644 --- a/platform/windows/crash_handler_windows.cpp +++ b/platform/windows/crash_handler_windows.cpp @@ -57,7 +57,7 @@ struct module_data { std::string image_name; std::string module_name; - void *base_address; + void *base_address = nullptr; DWORD load_size; }; diff --git a/platform/windows/joypad_windows.h b/platform/windows/joypad_windows.h index 223b44fcd6..08adc6b663 100644 --- a/platform/windows/joypad_windows.h +++ b/platform/windows/joypad_windows.h @@ -92,21 +92,13 @@ private: }; struct xinput_gamepad { - int id; - bool attached; - bool vibrating; - DWORD last_packet; + int id = 0; + bool attached = false; + bool vibrating = false; + DWORD last_packet = 0; XINPUT_STATE state; - uint64_t ff_timestamp; - uint64_t ff_end_timestamp; - - xinput_gamepad() { - attached = false; - vibrating = false; - ff_timestamp = 0; - ff_end_timestamp = 0; - last_packet = 0; - } + uint64_t ff_timestamp = 0; + uint64_t ff_end_timestamp = 0; }; typedef DWORD(WINAPI *XInputGetState_t)(DWORD dwUserIndex, XINPUT_STATE *pState); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index ae6b54513d..c8c04f230e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -802,6 +802,11 @@ void OS_Windows::set_current_tablet_driver(const String &p_driver) { } OS_Windows::OS_Windows(HINSTANCE _hInstance) { + ticks_per_second = 0; + ticks_start = 0; + main_loop = nullptr; + process_map = nullptr; + //Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink. HMODULE wintab_lib = LoadLibraryW(L"wintab32.dll"); if (wintab_lib) { |