Changed: Remove X11 code for OS X (we support Cocoa now)

This commit is contained in:
kervala 2016-01-02 11:34:04 +01:00
parent c1d8c9523b
commit f372014c72

View file

@ -169,12 +169,8 @@ static Bool isMouseMoveEvent(Display *display, XEvent *event, XPointer arg)
} }
#ifndef AltMask #ifndef AltMask
# ifdef NL_OS_MAC
# define AltMask (8192)
# else
# define AltMask (Mod1Mask) # define AltMask (Mod1Mask)
#endif #endif
#endif
TMouseButton getMouseButton (uint32 state) TMouseButton getMouseButton (uint32 state)
{ {
@ -204,33 +200,6 @@ TKey getKeyFromKeycode (uint keycode)
// keycodes are depending on system // keycodes are depending on system
switch (keycode) switch (keycode)
{ {
#ifdef NL_OS_MAC
/*
TODO use key mapping from driver/opengl/mac/cocoa_adapter.mm
*/
case 0x12: return Key1;
case 0x13: return Key2;
case 0x14: return Key3;
case 0x15: return Key4;
case 0x16: return Key6;
case 0x17: return Key5;
case 0x18: return KeyEQUALS;
case 0x19: return Key9;
case 0x1a: return Key7;
case 0x1c: return Key8;
case 0x1d: return Key0;
case 0x1e: return KeyRBRACKET;
case 0x21: return KeyLBRACKET;
case 0x27: return KeyAPOSTROPHE;
case 0x29: return KeySEMICOLON;
case 0x2a: return KeyBACKSLASH;
case 0x2b: return KeyCOMMA;
case 0x2c: return KeySLASH;
case 0x2f: return KeyPERIOD;
// case 0x5e: return KeyOEM_102;
// case 0x30: return KeyTILDE;
// case 0x3d: return KeyPARAGRAPH;
#else
case 0x0a: return Key1; case 0x0a: return Key1;
case 0x0b: return Key2; case 0x0b: return Key2;
case 0x0c: return Key3; case 0x0c: return Key3;
@ -281,7 +250,6 @@ TKey getKeyFromKeycode (uint keycode)
case 0x38: return KeyB; case 0x38: return KeyB;
case 0x39: return KeyN; case 0x39: return KeyN;
case 0x3a: return KeyM; case 0x3a: return KeyM;
#endif
default: default:
// nlwarning("missing keycode 0x%x %d '%c'", keycode, keycode, keycode); // nlwarning("missing keycode 0x%x %d '%c'", keycode, keycode, keycode);
break; break;