MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Tick

Method Tick

Source/Engine/Platform/UWP/UWPPlatform.cpp:72–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void UWPPlatform::Tick()
73{
74 PROFILE_CPU_NAMED("Application.Tick");
75
76 // Process all messages
77 CUWPPlatform->Tick();
78
79 // Update gamepads
80 auto win = Engine::MainWindow;
81 if (win)
82 {
83 int32 count = win->GetImpl()->GetGamepadsCount();
84 bool modified = false;
85
86 // Remove old ones
87 for (int32 i = count; i < Input::Gamepads.Count(); i++)
88 {
89 Input::Gamepads[i]->DeleteObject();
90 modified = true;
91 }
92 Input::Gamepads.Resize(count);
93
94 // Add new ones
95 for (int32 i = Input::Gamepads.Count(); i < count && i < MAX_GAMEPADS; i++)
96 {
97 Input::Gamepads.Add(New<UWPWindow::UWPGamepad>(win, i));
98 modified = true;
99 }
100
101 if (modified)
102 Input::OnGamepadsChanged();
103 }
104}
105
106void UWPPlatform::BeforeExit()
107{

Callers

nothing calls this directly

Calls 5

DeleteObjectMethod · 0.80
GetGamepadsCountMethod · 0.45
CountMethod · 0.45
ResizeMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected