unique_ptr'ing things and removing some XECLEANUP.
This commit is contained in:
@@ -32,9 +32,9 @@ void InitializeIfNeeded() {
|
||||
|
||||
void CleanupOnShutdown() {}
|
||||
|
||||
InputDriver* xe::hid::xinput::Create(InputSystem* input_system) {
|
||||
std::unique_ptr<InputDriver> Create(InputSystem* input_system) {
|
||||
InitializeIfNeeded();
|
||||
return new XInputInputDriver(input_system);
|
||||
return std::make_unique<XInputInputDriver>(input_system);
|
||||
}
|
||||
|
||||
} // namespace xinput
|
||||
|
||||
@@ -10,16 +10,17 @@
|
||||
#ifndef XENIA_HID_XINPUT_XINPUT_HID_H_
|
||||
#define XENIA_HID_XINPUT_XINPUT_HID_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
#include <memory>
|
||||
|
||||
XEDECLARECLASS2(xe, hid, InputDriver);
|
||||
XEDECLARECLASS2(xe, hid, InputSystem);
|
||||
#include <xenia/core.h>
|
||||
|
||||
namespace xe {
|
||||
namespace hid {
|
||||
class InputDriver;
|
||||
class InputSystem;
|
||||
namespace xinput {
|
||||
|
||||
InputDriver* Create(InputSystem* input_system);
|
||||
std::unique_ptr<InputDriver> Create(InputSystem* input_system);
|
||||
|
||||
} // namespace xinput
|
||||
} // namespace hid
|
||||
|
||||
Reference in New Issue
Block a user