Converting HID API to use be<> auto swapping type.

This commit is contained in:
Ben Vanik
2014-08-19 22:50:21 -07:00
parent 48a0e5c601
commit fb98683ed3
24 changed files with 325 additions and 518 deletions

View File

@@ -11,34 +11,32 @@
#include <xenia/hid/xinput/xinput_input_driver.h>
namespace xe {
namespace hid {
namespace xinput {
using namespace xe;
using namespace xe::hid;
using namespace xe::hid::xinput;
void InitializeIfNeeded();
void CleanupOnShutdown();
namespace {
void InitializeIfNeeded();
void CleanupOnShutdown();
void InitializeIfNeeded() {
static bool has_initialized = false;
if (has_initialized) {
return;
}
has_initialized = true;
//
atexit(CleanupOnShutdown);
void InitializeIfNeeded() {
static bool has_initialized = false;
if (has_initialized) {
return;
}
has_initialized = true;
void CleanupOnShutdown() {
}
//
atexit(CleanupOnShutdown);
}
void CleanupOnShutdown() {}
InputDriver* xe::hid::xinput::Create(InputSystem* input_system) {
InitializeIfNeeded();
return new XInputInputDriver(input_system);
}
} // namespace xinput
} // namespace hid
} // namespace xe