Speedup is realised by using thread-local variables. Note that on Windows we can't inline get_current_thread, but it's still faster this way than calling TlsGetValue.
In theory the cache line alignment should help avoid false sharing but I have not profiled that extensively.
Useful for uniquely identifying the process in a situation where multiple clients on the same host connect with the same server.
New version bump is not necessary, as old servers should just ignore the extra field in the datagram.
This typedefs to std::atomic<> when building with true threading, and uses a dummy implementation without.
This lets us use the full range of atomic operations offered by C++11, including explicit specification of memory fences. Using barriers lets the compiler generate more optimal code since currently we are using the quite strict sequential-consistent memory ordering for all operations. ReferenceCount has been changed to use the correct barriers (I hope). This may especially make a difference on weak ordering systems such as ARM.
Over time we should gradually replace the use of AtomicAdjust with the new patomic file.
Now behaves consistent with other applications (tested with Logitech MX Master 3 for Mac on macOS 10.13 in unnatural scrolling configuration).
Set `cocoa-invert-wheel-x true` to revert to old behaviour.
This causes an annoying "this app would like to receive keystrokes from any application" alert to be shown
Enable iokit-scan-mouse-devices or iokit-scan-keyboard-devices to restore the old behavior
I don't think this flag being missing currently affects any functionality, but it is meant to be set when geometry shaders (with adjacency) are supported.
- Support scroll wheel
- Support middle click, forward and back buttons (mouse4 and mouse5)
- Fix handling of key repeat events
- Correctly map numpad keys
[skip ci]
This key is called raw-< for lack of anything better, it's usually mapped as backslash on US keyboards but that would not allow distinguishing between the backslash key near the enter key.
This reverts commit f058bad802.
Reverting because I realised the current behaviour is happening due to different mungers, which my fix ignores.
Unfixes #1185