Win32_Gamepad.h
Go to the documentation of this file.
00001 /************************************************************************************
00002 
00003 Filename    :   Win32_Gamepad.h
00004 Content     :   Win32 implementation of Gamepad functionality.
00005 Created     :   May 6, 2013
00006 Authors     :   Lee Cooper
00007 
00008 Copyright   :   Copyright 2013 Oculus VR, Inc. All Rights reserved.
00009 
00010 Licensed under the Apache License, Version 2.0 (the "License");
00011 you may not use this file except in compliance with the License.
00012 You may obtain a copy of the License at
00013 
00014 http://www.apache.org/licenses/LICENSE-2.0
00015 
00016 Unless required by applicable law or agreed to in writing, software
00017 distributed under the License is distributed on an "AS IS" BASIS,
00018 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00019 See the License for the specific language governing permissions and
00020 limitations under the License.
00021 
00022 ************************************************************************************/
00023 
00024 #ifndef OVR_Win32_Gamepad_h
00025 #define OVR_Win32_Gamepad_h
00026 
00027 #include "Gamepad.h"
00028 
00029 #include <windows.h>
00030 #include <xinput.h>
00031 
00032 namespace OVR { namespace Platform { namespace Win32 {
00033 
00034 class GamepadManager : public Platform::GamepadManager
00035 {
00036 public:
00037     GamepadManager();
00038     ~GamepadManager();
00039 
00040     virtual UInt32  GetGamepadCount();
00041     virtual bool    GetGamepadState(UInt32 index, GamepadState* pState);
00042 
00043 private:
00044     // Dynamically ink to XInput to simplify projects.
00045     HMODULE             hXInputModule;
00046     typedef DWORD (WINAPI *PFn_XInputGetState)(DWORD dwUserIndex, XINPUT_STATE* pState);
00047     PFn_XInputGetState  pXInputGetState;
00048 
00049     UInt32              LastPadPacketNo;
00050 };
00051 
00052 }}}
00053 
00054 #endif // OVR_Win32_Gamepad_h


oculus_sdk
Author(s):
autogenerated on Mon Oct 6 2014 03:01:19