mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Ignore key character text input on 64 bit mac backend while Cmd is pressed, fixes 'c' and 'v' appearing in chat when copy/pasting. (Thanks Ally)
This commit is contained in:
parent
730eadf47b
commit
6b4342d2c5
@ -48,7 +48,7 @@ void Bitmap_Scale(Bitmap* dst, Bitmap* src, int srcX, int srcY, int srcWidth, in
|
|||||||
BitmapCol* srcRow;
|
BitmapCol* srcRow;
|
||||||
int x, y, width, height;
|
int x, y, width, height;
|
||||||
|
|
||||||
width = dst->Width;
|
width = dst->Width;
|
||||||
height = dst->Height;
|
height = dst->Height;
|
||||||
|
|
||||||
for (y = 0; y < height; y++) {
|
for (y = 0; y < height; y++) {
|
||||||
|
@ -2829,7 +2829,13 @@ static void ProcessKeyChars(id ev) {
|
|||||||
const char* src;
|
const char* src;
|
||||||
String str;
|
String str;
|
||||||
id chars;
|
id chars;
|
||||||
int i, len;
|
int i, len, flags;
|
||||||
|
|
||||||
|
/* Ignore text input while cmd is held down */
|
||||||
|
/* e.g. so Cmd + V to paste doesn't leave behind 'v' */
|
||||||
|
flags = (int)objc_msgSend(ev, selModifiers);
|
||||||
|
if (flags & 0x000008) return;
|
||||||
|
if (flags & 0x000010) return;
|
||||||
|
|
||||||
chars = objc_msgSend(ev, selCharacters);
|
chars = objc_msgSend(ev, selCharacters);
|
||||||
src = objc_msgSend(chars, selUtf8String);
|
src = objc_msgSend(chars, selUtf8String);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user