Adding a bunch of profiling tracers.
This commit is contained in:
@@ -42,6 +42,8 @@ void InputSystem::AddDriver(InputDriver* driver) {
|
||||
|
||||
X_RESULT InputSystem::GetCapabilities(
|
||||
uint32_t user_index, uint32_t flags, X_INPUT_CAPABILITIES& out_caps) {
|
||||
SCOPE_profile_cpu_f("hid");
|
||||
|
||||
for (auto it = drivers_.begin(); it != drivers_.end(); ++it) {
|
||||
InputDriver* driver = *it;
|
||||
if (XSUCCEEDED(driver->GetCapabilities(user_index, flags, out_caps))) {
|
||||
@@ -52,6 +54,8 @@ X_RESULT InputSystem::GetCapabilities(
|
||||
}
|
||||
|
||||
X_RESULT InputSystem::GetState(uint32_t user_index, X_INPUT_STATE& out_state) {
|
||||
SCOPE_profile_cpu_f("hid");
|
||||
|
||||
for (auto it = drivers_.begin(); it != drivers_.end(); ++it) {
|
||||
InputDriver* driver = *it;
|
||||
if (driver->GetState(user_index, out_state) == X_ERROR_SUCCESS) {
|
||||
@@ -63,6 +67,8 @@ X_RESULT InputSystem::GetState(uint32_t user_index, X_INPUT_STATE& out_state) {
|
||||
|
||||
X_RESULT InputSystem::SetState(
|
||||
uint32_t user_index, X_INPUT_VIBRATION& vibration) {
|
||||
SCOPE_profile_cpu_f("hid");
|
||||
|
||||
for (auto it = drivers_.begin(); it != drivers_.end(); ++it) {
|
||||
InputDriver* driver = *it;
|
||||
if (XSUCCEEDED(driver->SetState(user_index, vibration))) {
|
||||
@@ -74,6 +80,8 @@ X_RESULT InputSystem::SetState(
|
||||
|
||||
X_RESULT InputSystem::GetKeystroke(
|
||||
uint32_t user_index, uint32_t flags, X_INPUT_KEYSTROKE& out_keystroke) {
|
||||
SCOPE_profile_cpu_f("hid");
|
||||
|
||||
for (auto it = drivers_.begin(); it != drivers_.end(); ++it) {
|
||||
InputDriver* driver = *it;
|
||||
if (XSUCCEEDED(driver->GetKeystroke(user_index, flags, out_keystroke))) {
|
||||
|
||||
Reference in New Issue
Block a user