mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-24 05:31:13 +00:00
Allow the UTF-8 splitting loop to be interrupted
This commit is contained in:
+1
-1
@@ -570,7 +570,7 @@ static void inputSendThreadProc(void* context) {
|
|||||||
|
|
||||||
// We send each Unicode code point individually. This way we can always ensure they will
|
// We send each Unicode code point individually. This way we can always ensure they will
|
||||||
// never straddle a packet boundary (which will cause a parsing error on the host).
|
// never straddle a packet boundary (which will cause a parsing error on the host).
|
||||||
while (i < totalLength) {
|
while (i < totalLength && !PltIsThreadInterrupted(&inputSendThread)) {
|
||||||
uint32_t codePointLength;
|
uint32_t codePointLength;
|
||||||
uint8_t firstByte = (uint8_t)holder->packet.unicode.text[i];
|
uint8_t firstByte = (uint8_t)holder->packet.unicode.text[i];
|
||||||
if ((firstByte & 0x80) == 0x00) {
|
if ((firstByte & 0x80) == 0x00) {
|
||||||
|
|||||||
Reference in New Issue
Block a user