HID system skeleton.

This commit is contained in:
Ben Vanik
2013-10-23 21:47:36 -07:00
parent 20bd15e7fe
commit 74803ae174
25 changed files with 684 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_HID_NOP_NOP_HID_PRIVATE_H_
#define XENIA_HID_NOP_NOP_HID_PRIVATE_H_
#include <xenia/core.h>
#include <xenia/hid/nop/nop_hid.h>
namespace xe {
namespace hid {
namespace nop {
} // namespace nop
} // namespace hid
} // namespace xe
#endif // XENIA_HID_NOP_NOP_HID_PRIVATE_H_

View File

@@ -0,0 +1,44 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/hid/nop/nop_hid.h>
#include <xenia/hid/nop/nop_input_driver.h>
using namespace xe;
using namespace xe::hid;
using namespace xe::hid::nop;
namespace {
void InitializeIfNeeded();
void CleanupOnShutdown();
void InitializeIfNeeded() {
static bool has_initialized = false;
if (has_initialized) {
return;
}
has_initialized = true;
//
atexit(CleanupOnShutdown);
}
void CleanupOnShutdown() {
}
}
InputDriver* xe::hid::nop::Create(InputSystem* input_system) {
InitializeIfNeeded();
return new NopInputDriver(input_system);
}

View File

@@ -0,0 +1,33 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_HID_NOP_NOP_HID_H_
#define XENIA_HID_NOP_NOP_HID_H_
#include <xenia/core.h>
XEDECLARECLASS2(xe, hid, InputDriver);
XEDECLARECLASS2(xe, hid, InputSystem);
namespace xe {
namespace hid {
namespace nop {
InputDriver* Create(InputSystem* input_system);
} // namespace nop
} // namespace hid
} // namespace xe
#endif // XENIA_HID_NOP_NOP_HID_H_

View File

@@ -0,0 +1,29 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/hid/nop/nop_input_driver.h>
#include <xenia/hid/hid-private.h>
using namespace xe;
using namespace xe::hid;
using namespace xe::hid::nop;
NopInputDriver::NopInputDriver(InputSystem* input_system) :
InputDriver(input_system) {
}
NopInputDriver::~NopInputDriver() {
}
X_STATUS NopInputDriver::Setup() {
return X_STATUS_SUCCESS;
}

View File

@@ -0,0 +1,40 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_HID_NOP_NOP_INPUT_DRIVER_H_
#define XENIA_HID_NOP_NOP_INPUT_DRIVER_H_
#include <xenia/core.h>
#include <xenia/hid/input_driver.h>
#include <xenia/hid/nop/nop_hid-private.h>
namespace xe {
namespace hid {
namespace nop {
class NopInputDriver : public InputDriver {
public:
NopInputDriver(InputSystem* input_system);
virtual ~NopInputDriver();
virtual X_STATUS Setup();
protected:
};
} // namespace nop
} // namespace hid
} // namespace xe
#endif // XENIA_HID_NOP_NOP_INPUT_DRIVER_H_

View File

@@ -0,0 +1,10 @@
# Copyright 2013 Ben Vanik. All Rights Reserved.
{
'sources': [
'nop_hid-private.h',
'nop_hid.cc',
'nop_hid.h',
'nop_input_driver.cc',
'nop_input_driver.h',
],
}