Changeset 122150 in webkit
- Timestamp:
- Jul 9, 2012 12:59:02 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122145 r122150 1 2012-07-09 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL] Log significant Gamepad API-related events 4 https://bugs.webkit.org/show_bug.cgi?id=90595 5 6 Reviewed by Antonio Gomes. 7 8 Log significant Gamepad API-related events in 9 GamepadsEfl. 10 11 No new tests, no behavior change. 12 13 * platform/efl/GamepadsEfl.cpp: 14 (WebCore::GamepadDeviceEfl::deviceFile): 15 (GamepadDeviceEfl): 16 (WebCore::GamepadDeviceEfl::GamepadDeviceEfl): 17 (WebCore::GamepadDeviceEfl::readCallback): 18 (WebCore::GamepadsEfl::registerDevice): 19 (WebCore::GamepadsEfl::unregisterDevice): 20 1 21 2012-07-09 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/platform/efl/GamepadsEfl.cpp
r121668 r122150 31 31 #include "GamepadDeviceLinux.h" 32 32 #include "GamepadList.h" 33 #include "Logging.h" 33 34 #include <Ecore.h> 34 35 #include <Eeze.h> … … 52 53 ~GamepadDeviceEfl(); 53 54 void resetFdHandler() { m_fdHandler = 0; } 55 const String& deviceFile() const { return m_deviceFile; } 54 56 55 57 private: … … 58 60 59 61 Ecore_Fd_Handler* m_fdHandler; 62 String m_deviceFile; 60 63 }; 61 64 … … 63 66 : GamepadDeviceLinux(deviceFile) 64 67 , m_fdHandler(0) 68 , m_deviceFile(deviceFile) 65 69 { 66 70 if (m_fileDescriptor < 0) … … 83 87 84 88 if (ecore_main_fd_handler_active_get(fdHandler, ECORE_FD_ERROR)) { 85 LOG_ERROR("An error occurred while watching the joystick file descriptor , aborting.");89 LOG_ERROR("An error occurred while watching the joystick file descriptor at %s, aborting.", gamepadDevice->deviceFile().utf8().data()); 86 90 gamepadDevice->resetFdHandler(); 87 91 return ECORE_CALLBACK_CANCEL; … … 93 97 94 98 if (len <= 0) { 95 LOG_ERROR("Failed to read joystick file descriptor , aborting.");99 LOG_ERROR("Failed to read joystick file descriptor at %s, aborting.", gamepadDevice->deviceFile().utf8().data()); 96 100 gamepadDevice->resetFdHandler(); 97 101 return ECORE_CALLBACK_CANCEL; 98 102 } 99 103 if (len != sizeof(event)) { 100 LOG_ERROR("Wrong js_event size read on file descriptor , ignoring.");104 LOG_ERROR("Wrong js_event size read on file descriptor at %s, ignoring.", gamepadDevice->deviceFile().utf8().data()); 101 105 return ECORE_CALLBACK_RENEW; 102 106 } … … 180 184 return; 181 185 186 LOG(Gamepad, "Registering gamepad at %s", deviceFile); 187 182 188 const size_t slotCount = m_slots.size(); 183 189 for (size_t index = 0; index < slotCount; ++index) { 184 190 if (!m_slots[index]) { 185 191 m_slots[index] = GamepadDeviceEfl::create(String::fromUTF8(deviceFile)); 192 LOG(Gamepad, "Gamepad device name is %s", m_slots[index]->id().utf8().data()); 186 193 m_deviceMap.add(syspath, m_slots[index].get()); 187 194 break; … … 196 203 197 204 GamepadDeviceEfl* gamepadDevice = m_deviceMap.take(syspath); 205 LOG(Gamepad, "Unregistering gamepad at %s", gamepadDevice->deviceFile().utf8().data()); 198 206 const size_t index = m_slots.find(gamepadDevice); 199 207 ASSERT(index != notFound);
Note: See TracChangeset
for help on using the changeset viewer.