Index: src/platform/Linux/OFGameController.m ================================================================== --- src/platform/Linux/OFGameController.m +++ src/platform/Linux/OFGameController.m @@ -64,17 +64,17 @@ case BTN_Y: return @"Y"; case BTN_Z: return @"Z"; case BTN_TL: - return @"TL"; + return @"L"; case BTN_TR: - return @"TR"; + return @"R"; case BTN_TL2: - return @"TL2"; + return @"ZL"; case BTN_TR2: - return @"TR2"; + return @"ZR"; case BTN_SELECT: return @"Select"; case BTN_START: return @"Start"; case BTN_MODE: @@ -212,10 +212,15 @@ [_buttons addObject: @"D-Pad Left"]; [_buttons addObject: @"D-Pad Right"]; [_buttons addObject: @"D-Pad Up"]; [_buttons addObject: @"D-Pad Down"]; } + + if (OFBitSetIsSet(absBits, ABS_Z)) + [_buttons addObject: @"ZL"]; + if (OFBitSetIsSet(absBits, ABS_RZ)) + [_buttons addObject: @"ZR"]; } [_buttons makeImmutable]; } @catch (id e) { [self release]; @@ -321,10 +326,22 @@ @"D-Pad Up"]; [_pressedButtons removeObject: @"D-Pad Down"]; } break; + case ABS_Z: + if (event.value > 0) + [_pressedButtons addObject: @"ZL"]; + else + [_pressedButtons removeObject: @"ZL"]; + break; + case ABS_RZ: + if (event.value > 0) + [_pressedButtons addObject: @"ZR"]; + else + [_pressedButtons removeObject: @"ZR"]; + break; } break; } }