GCGamepad is deprecated
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jan 2019 19:29:27 +0000 (19:29 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jan 2019 19:29:27 +0000 (19:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194056
<rdar://problem/47685010>

Reviewed by Brady Eidson.

GCGamepad is deprecated, resulting in compiler warnings. Address this
for now by employing ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.

No new tests since there should be no observable behavior difference.

* platform/gamepad/cocoa/GameControllerGamepad.mm:
(WebCore::GameControllerGamepad::setupAsGamepad):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240799 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm

index 083bb3d..817faad 100644 (file)
@@ -1,3 +1,19 @@
+2019-01-31  Keith Rollin  <krollin@apple.com>
+
+        GCGamepad is deprecated
+        https://bugs.webkit.org/show_bug.cgi?id=194056
+        <rdar://problem/47685010>
+
+        Reviewed by Brady Eidson.
+
+        GCGamepad is deprecated, resulting in compiler warnings. Address this
+        for now by employing ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
+
+        No new tests since there should be no observable behavior difference.
+
+        * platform/gamepad/cocoa/GameControllerGamepad.mm:
+        (WebCore::GameControllerGamepad::setupAsGamepad):
+
 2019-01-31  Darin Adler  <darin@apple.com>
 
         Simplify and streamline code that creates an appropriate document based on MIME type
index 2af9414..a1ff386 100644 (file)
@@ -147,11 +147,13 @@ void GameControllerGamepad::setupAsGamepad()
 
     m_id = makeString(String(m_gcController.get().vendorName), " Gamepad"_s);
 
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN // GCGamepad
     m_gamepad.get().valueChangedHandler = ^(GCGamepad *, GCControllerElement *) {
         m_lastUpdateTime = MonotonicTime::now();
         GameControllerGamepadProvider::singleton().gamepadHadInput(*this, m_hadButtonPresses);
         m_hadButtonPresses = false;
     };
+    ALLOW_DEPRECATED_DECLARATIONS_END
 
     m_buttonValues.resize(6);
     m_buttonValues[0] = m_extendedGamepad.get().buttonA.value;