You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix incorrect input cursor position on MacOS with retina screen in use (#1607)
* [M]Fix code error when checking UTF-8 data
Let a 3 bytes UTF-8 data = [0xE4, 0x8A, 0xBC], when b = 0xE4 (1110 0100), it will be treated as 2 bytes.
See this part:
```java
if (b < 0x80) {
// good
}
else if ((b & 0xC0) == 0xC0) {// (0xE4 & 0xC0) == 0xC0 =====> true
utf8State = UTF8_2BYTE;
}
else if ((b & 0xE0) == 0xE0) {// (0xE4 & 0xE0) == 0xE0 =====> true
utf8State = UTF8_3BYTE_1;
}
else {
utf8State = UTF8_ILLEGAL;
}
```
3 bytes UTF-8 data while always be treated as 2 bytes UTF-8 data.
It's better that always treat String data as UTF-8 now.
see https://hub.jmonkeyengine.org/t/code-error-on-checking-utf-8-data/43909
* [M]Use StandardCharsets.UTF_8 instead of constant 'UTF8'
* [Add]Add HiDPI support with lwjgl3-glfw
* [M]Add a parameter UseRetinaFrameBuffer to enable/disable usage of full resolution framebuffers on Retina Display
* [M]WindowContentScale is incorrect when glfw window is created, and we don't get any callback when it is changed.So just get it from time to time when mouse cursor is moved.
* [M]Get the real frame buffer size at the 2nd frame after the context is restarted.
* [M]Change default value of UseRetinaFrameBuffer to true.
* [M]Add resolution check before reshape
Co-authored-by: 闫茂源 <[email protected]>
Co-authored-by: 闫茂源 <[email protected]>
0 commit comments