FreeRDP
Loading...
Searching...
No Matches
SdlWheelAxis Class Reference

#include <sdl_wheel.hpp>

Public Member Functions

INT32 add (float notches)

Detailed Description

FreeRDP: A Remote Desktop Protocol Implementation SDL Client: mouse wheel rotation in RDP units

Copyright 2026 Cong Zhang congz.nosp@m.hang.nosp@m.zh@gm.nosp@m.ail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 33 of file sdl_wheel.hpp.

Member Function Documentation

◆ add()

INT32 SdlWheelAxis::add ( float notches)
inlinenodiscard

Definition at line 36 of file sdl_wheel.hpp.

37 {
38 _milli += std::llround(static_cast<double>(notches) * 120.0 * 1000.0);
39 const int64_t units = _milli / 1000; /* toward zero; the rest keeps its sign */
40 _milli -= units * 1000;
41 return static_cast<INT32>(units);
42 }

The documentation for this class was generated from the following file: