Changeset 122150 in webkit


Ignore:
Timestamp:
Jul 9, 2012 12:59:02 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Log significant Gamepad API-related events
https://bugs.webkit.org/show_bug.cgi?id=90595

Patch by Christophe Dumez <Christophe Dumez> on 2012-07-09
Reviewed by Antonio Gomes.

Log significant Gamepad API-related events in
GamepadsEfl.

No new tests, no behavior change.

  • platform/efl/GamepadsEfl.cpp:

(WebCore::GamepadDeviceEfl::deviceFile):
(GamepadDeviceEfl):
(WebCore::GamepadDeviceEfl::GamepadDeviceEfl):
(WebCore::GamepadDeviceEfl::readCallback):
(WebCore::GamepadsEfl::registerDevice):
(WebCore::GamepadsEfl::unregisterDevice):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r122145 r122150  
     12012-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
    1212012-07-09  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/Source/WebCore/platform/efl/GamepadsEfl.cpp

    r121668 r122150  
    3131#include "GamepadDeviceLinux.h"
    3232#include "GamepadList.h"
     33#include "Logging.h"
    3334#include <Ecore.h>
    3435#include <Eeze.h>
     
    5253    ~GamepadDeviceEfl();
    5354    void resetFdHandler() { m_fdHandler = 0; }
     55    const String& deviceFile() const { return m_deviceFile; }
    5456
    5557private:
     
    5860
    5961    Ecore_Fd_Handler* m_fdHandler;
     62    String m_deviceFile;
    6063};
    6164
     
    6366    : GamepadDeviceLinux(deviceFile)
    6467    , m_fdHandler(0)
     68    , m_deviceFile(deviceFile)
    6569{
    6670    if (m_fileDescriptor < 0)
     
    8387
    8488    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());
    8690        gamepadDevice->resetFdHandler();
    8791        return ECORE_CALLBACK_CANCEL;
     
    9397
    9498    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());
    96100        gamepadDevice->resetFdHandler();
    97101        return ECORE_CALLBACK_CANCEL;
    98102    }
    99103    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());
    101105        return ECORE_CALLBACK_RENEW;
    102106    }
     
    180184        return;
    181185
     186    LOG(Gamepad, "Registering gamepad at %s", deviceFile);
     187
    182188    const size_t slotCount = m_slots.size();
    183189    for (size_t index = 0; index < slotCount; ++index) {
    184190        if (!m_slots[index]) {
    185191            m_slots[index] = GamepadDeviceEfl::create(String::fromUTF8(deviceFile));
     192            LOG(Gamepad, "Gamepad device name is %s", m_slots[index]->id().utf8().data());
    186193            m_deviceMap.add(syspath, m_slots[index].get());
    187194            break;
     
    196203
    197204    GamepadDeviceEfl* gamepadDevice = m_deviceMap.take(syspath);
     205    LOG(Gamepad, "Unregistering gamepad at %s", gamepadDevice->deviceFile().utf8().data());
    198206    const size_t index = m_slots.find(gamepadDevice);
    199207    ASSERT(index != notFound);
Note: See TracChangeset for help on using the changeset viewer.