Assorted initialization cleanup and similar, found by valgrind and warnings

This commit is contained in:
Henrik Rydgård 2023-01-30 18:31:49 +01:00
parent 0f52954eae
commit b97749d623
8 changed files with 21 additions and 18 deletions

View file

@ -202,7 +202,9 @@ void ScreenManager::sendMessage(const char *msg, const char *value) {
if (!strcmp(msg, "recreateviews"))
RecreateAllViews();
if (!strcmp(msg, "lost_focus")) {
TouchInput input;
TouchInput input{};
input.x = -50000.0f;
input.y = -50000.0f;
input.flags = TOUCH_RELEASE_ALL;
input.timestamp = time_now_d();
input.id = 0;
@ -238,7 +240,9 @@ void ScreenManager::push(Screen *screen, int layerFlags) {
// Release touches and unfocus.
UI::SetFocusedView(nullptr);
TouchInput input;
TouchInput input{};
input.x = -50000.0f;
input.y = -50000.0f;
input.flags = TOUCH_RELEASE_ALL;
input.timestamp = time_now_d();
input.id = 0;