瀏覽代碼

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];


Loading…
取消
儲存