updated inputmanager

This commit is contained in:
turanszkij
2015-09-09 20:39:41 +02:00
parent 4b026215f4
commit a7359cdbc4
3 changed files with 0 additions and 8 deletions
-5
View File
@@ -11,11 +11,9 @@ wiInputManager::InputCollection wiInputManager::inputs;
#ifndef WINSTORE_SUPPORT
#define KEY_DOWN(vk_code) (GetAsyncKeyState(vk_code) < 0)
#define KEY_TOGGLE(vk_code) ((GetAsyncKeyState(vk_code) & 1) != 0)
#define MOUSEBUTTONDOWN(vk_code) (GetAsyncKeyState(vk_code) & 0x8000)
#else
#define KEY_DOWN(vk_code) (false)
#define KEY_TOGGLE(vk_code) (false)
#define MOUSEBUTTONDOWN(vk_code) (false)
#endif //WINSTORE_SUPPORT
#define KEY_UP(vk_code) (!KEY_DOWN(vk_code))
@@ -90,9 +88,6 @@ bool wiInputManager::down(DWORD button, InputType inputType, short playerindex)
return true;
}
break;
case MOUSE:
return MOUSEBUTTONDOWN(static_cast<int>(button)) != 0;
break;
default:break;
}
return false;
-2
View File
@@ -19,13 +19,11 @@ public:
static void Update();
static void CleanUp();
// do not change order! (it is used in lua)
enum InputType{
DIRECTINPUT_JOYPAD,
XINPUT_JOYPAD,
KEYBOARD,
RAWINPUT_JOYPAD,
MOUSE,
INPUTTYPE_COUNT
};
struct Input{
-1
View File
@@ -114,7 +114,6 @@ void wiInputManager_BindLua::Bind()
wiLua::GetGlobal()->RunText("XINPUT_JOYPAD = 1");
wiLua::GetGlobal()->RunText("KEYBOARD = 2");
wiLua::GetGlobal()->RunText("RAWINPUT_JOYPAD = 3");
wiLua::GetGlobal()->RunText("MOUSE = 4");
//Keyboard
wiLua::GetGlobal()->RunText("VK_UP = 0x26");