summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_console.h
diff options
context:
space:
mode:
authorGravatar Lioncash2021-12-13 21:09:28 -0500
committerGravatar Lioncash2021-12-13 21:22:02 -0500
commite05d2a70b24e550d67fcdd24aae7094ad41745f8 (patch)
treeaf5116d02b99366344c261df03cae992b2e96ae5 /src/core/hid/emulated_console.h
parentcommon/input: Remove unnecessary returns (diff)
downloadyuzu-e05d2a70b24e550d67fcdd24aae7094ad41745f8.tar.gz
yuzu-e05d2a70b24e550d67fcdd24aae7094ad41745f8.tar.xz
yuzu-e05d2a70b24e550d67fcdd24aae7094ad41745f8.zip
common/input: Avoid numerous large copies of CallbackStatus
CallbackStatus instances aren't the cheapest things to copy around (relative to everything else), given that they're currently 520 bytes in size and are currently copied numerous times when callbacks are invoked. Instead, we can pass the status by const reference to avoid all the copying.
Diffstat (limited to 'src/core/hid/emulated_console.h')
-rw-r--r--src/core/hid/emulated_console.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hid/emulated_console.h b/src/core/hid/emulated_console.h
index bb3d7ab90..3afd284d5 100644
--- a/src/core/hid/emulated_console.h
+++ b/src/core/hid/emulated_console.h
@@ -155,14 +155,14 @@ private:
155 * Updates the motion status of the console 155 * Updates the motion status of the console
156 * @param callback A CallbackStatus containing gyro and accelerometer data 156 * @param callback A CallbackStatus containing gyro and accelerometer data
157 */ 157 */
158 void SetMotion(Common::Input::CallbackStatus callback); 158 void SetMotion(const Common::Input::CallbackStatus& callback);
159 159
160 /** 160 /**
161 * Updates the touch status of the console 161 * Updates the touch status of the console
162 * @param callback A CallbackStatus containing the touch position 162 * @param callback A CallbackStatus containing the touch position
163 * @param index Finger ID to be updated 163 * @param index Finger ID to be updated
164 */ 164 */
165 void SetTouch(Common::Input::CallbackStatus callback, std::size_t index); 165 void SetTouch(const Common::Input::CallbackStatus& callback, std::size_t index);
166 166
167 /** 167 /**
168 * Triggers a callback that something has changed on the console status 168 * Triggers a callback that something has changed on the console status