소스 검색

build: more Emscripten improvements; keyboard input works properly now.

legacy
Sam Hocevar sam 11 년 전
부모
커밋
68c2da5898
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -1
      src/platform/sdl/sdlinput.cpp

+ 3
- 1
src/platform/sdl/sdlinput.cpp 파일 보기

@@ -144,7 +144,7 @@ void SdlInputData::Tick(float seconds)
Input::SetMousePos(mouse);

/* Pump all joystick events because no event is coming to us. */
# if SDL_FORCE_POLL_JOYSTICK && EMSCRIPTEN
# if SDL_FORCE_POLL_JOYSTICK && !EMSCRIPTEN
SDL_JoystickUpdate();
for (int j = 0; j < m_joysticks.Count(); j++)
{
@@ -279,6 +279,7 @@ void SdlInputData::Tick(float seconds)
lolstate[Key::Z] = sdlstate[SDLK_z];
lolstate[Key::Delete] = sdlstate[SDLK_DELETE];

#if SDLK_WORLD_0
lolstate[Key::World0] = sdlstate[SDLK_WORLD_0];
lolstate[Key::World1] = sdlstate[SDLK_WORLD_1];
lolstate[Key::World2] = sdlstate[SDLK_WORLD_2];
@@ -375,6 +376,7 @@ void SdlInputData::Tick(float seconds)
lolstate[Key::World93] = sdlstate[SDLK_WORLD_93];
lolstate[Key::World94] = sdlstate[SDLK_WORLD_94];
lolstate[Key::World95] = sdlstate[SDLK_WORLD_95];
#endif

lolstate[Key::KP0] = sdlstate[SDLK_KP0];
lolstate[Key::KP1] = sdlstate[SDLK_KP1];


불러오는 중...
취소
저장