mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
18 lines
433 B
C++
18 lines
433 B
C++
#include "xna/xna-dx.hpp"
|
|
|
|
namespace xna {
|
|
KeyboardState Keyboard::GetState() {
|
|
if (!impl || !impl->_dxKeyboard)
|
|
return KeyboardState();
|
|
|
|
const auto state = Keyboard::impl->_dxKeyboard->GetState();
|
|
auto ptr = reinterpret_cast<const uint32_t*>(&state);
|
|
const auto xnaState = reinterpret_cast<const KeyboardState*>(ptr);
|
|
|
|
return *xnaState;
|
|
}
|
|
|
|
void Keyboard::Initialize() {
|
|
impl = unew<PlatformImplementation>();
|
|
}
|
|
} |