From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/common/emu_window.h | 54 +++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'src/common/emu_window.h') diff --git a/src/common/emu_window.h b/src/common/emu_window.h index 57e303b6d..de8badd4f 100644 --- a/src/common/emu_window.h +++ b/src/common/emu_window.h @@ -30,15 +30,14 @@ * - DO NOT TREAT THIS CLASS AS A GUI TOOLKIT ABSTRACTION LAYER. That's not what it is. Please * re-read the upper points again and think about it if you don't see this. */ -class EmuWindow -{ +class EmuWindow { public: /// Data structure to store emuwindow configuration struct WindowConfig { - bool fullscreen; - int res_width; - int res_height; - std::pair min_client_area_size; + bool fullscreen; + int res_width; + int res_height; + std::pair min_client_area_size; }; /// Describes the layout of the window framebuffer (size and top/bottom screen positions) @@ -193,15 +192,18 @@ public: /** * Returns currently active configuration. - * @note Accesses to the returned object need not be consistent because it may be modified in another thread + * @note Accesses to the returned object need not be consistent because it may be modified in + * another thread */ const WindowConfig& GetActiveConfig() const { return active_config; } /** - * Requests the internal configuration to be replaced by the specified argument at some point in the future. - * @note This method is thread-safe, because it delays configuration changes to the GUI event loop. Hence there is no guarantee on when the requested configuration will be active. + * Requests the internal configuration to be replaced by the specified argument at some point in + * the future. + * @note This method is thread-safe, because it delays configuration changes to the GUI event + * loop. Hence there is no guarantee on when the requested configuration will be active. */ void SetConfig(const WindowConfig& val) { config = val; @@ -227,7 +229,8 @@ protected: circle_pad_y = 0; touch_pressed = false; } - virtual ~EmuWindow() {} + virtual ~EmuWindow() { + } /** * Processes any pending configuration changes from the last SetConfig call. @@ -258,7 +261,7 @@ protected: * Update internal client area size with the given parameter. * @note EmuWindow implementations will usually use this in window resize event handlers. */ - void NotifyClientAreaSizeChanged(const std::pair& size) { + void NotifyClientAreaSizeChanged(const std::pair& size) { client_area_width = size.first; client_area_height = size.second; } @@ -266,32 +269,35 @@ protected: private: /** * Handler called when the minimal client area was requested to be changed via SetConfig. - * For the request to be honored, EmuWindow implementations will usually reimplement this function. + * For the request to be honored, EmuWindow implementations will usually reimplement this + * function. */ - virtual void OnMinimalClientAreaChangeRequest(const std::pair& minimal_size) { + virtual void + OnMinimalClientAreaChangeRequest(const std::pair& minimal_size) { // By default, ignore this request and do nothing. } FramebufferLayout framebuffer_layout; ///< Current framebuffer layout - unsigned client_area_width; ///< Current client width, should be set by window impl. - unsigned client_area_height; ///< Current client height, should be set by window impl. + unsigned client_area_width; ///< Current client width, should be set by window impl. + unsigned client_area_height; ///< Current client height, should be set by window impl. - WindowConfig config; ///< Internal configuration (changes pending for being applied in ProcessConfigurationChanges) - WindowConfig active_config; ///< Internal active configuration + WindowConfig config; ///< Internal configuration (changes pending for being applied in + /// ProcessConfigurationChanges) + WindowConfig active_config; ///< Internal active configuration - bool touch_pressed; ///< True if touchpad area is currently pressed, otherwise false + bool touch_pressed; ///< True if touchpad area is currently pressed, otherwise false - u16 touch_x; ///< Touchpad X-position in native 3DS pixel coordinates (0-320) - u16 touch_y; ///< Touchpad Y-position in native 3DS pixel coordinates (0-240) + u16 touch_x; ///< Touchpad X-position in native 3DS pixel coordinates (0-320) + u16 touch_y; ///< Touchpad Y-position in native 3DS pixel coordinates (0-240) s16 circle_pad_x; ///< Circle pad X-position in native 3DS pixel coordinates (-156 - 156) s16 circle_pad_y; ///< Circle pad Y-position in native 3DS pixel coordinates (-156 - 156) - /** - * Clip the provided coordinates to be inside the touchscreen area. - */ - std::tuple ClipToTouchScreen(unsigned new_x, unsigned new_y); + /** + * Clip the provided coordinates to be inside the touchscreen area. + */ + std::tuple ClipToTouchScreen(unsigned new_x, unsigned new_y); Service::HID::PadState pad_state; }; -- cgit v1.2.3