Browse Source

build: improve emscripten build.

undefined
Sam Hocevar 9 years ago
parent
commit
42813316b8
6 changed files with 12 additions and 5 deletions
  1. +1
    -1
      src/Makefile.am
  2. +1
    -0
      src/application/application.cpp
  3. +0
    -0
      src/image/filter/colors.cpp
  4. +2
    -2
      src/lolcore.vcxproj
  5. +2
    -2
      src/lolcore.vcxproj.filters
  6. +6
    -0
      src/platform/sdl/sdlinput.cpp

+ 1
- 1
src/Makefile.am View File

@@ -121,7 +121,7 @@ liblolcore_sources = \
image/color/cie1931.cpp image/color/color.cpp \ image/color/cie1931.cpp image/color/color.cpp \
image/dither/random.cpp image/dither/ediff.cpp image/dither/dbs.cpp \ image/dither/random.cpp image/dither/ediff.cpp image/dither/dbs.cpp \
image/dither/ostromoukhov.cpp image/dither/ordered.cpp \ image/dither/ostromoukhov.cpp image/dither/ordered.cpp \
image/filter/convolution.cpp image/filter/color.cpp \
image/filter/convolution.cpp image/filter/colors.cpp \
image/filter/dilate.cpp image/filter/median.cpp image/filter/yuv.cpp \ image/filter/dilate.cpp image/filter/median.cpp image/filter/yuv.cpp \
image/movie.cpp \ image/movie.cpp \
\ \


+ 1
- 0
src/application/application.cpp View File

@@ -88,6 +88,7 @@ void Application::Tick()
void Application::Run() void Application::Run()
{ {
#if EMSCRIPTEN #if EMSCRIPTEN
g_app = this;
emscripten_set_main_loop(AppCallback, 0, 1); emscripten_set_main_loop(AppCallback, 0, 1);
#else #else
while (MustTick()) while (MustTick())


src/image/filter/color.cpp → src/image/filter/colors.cpp View File


+ 2
- 2
src/lolcore.vcxproj View File

@@ -134,7 +134,7 @@
<ClCompile Include="image\codec\zed-palette-image.cpp" /> <ClCompile Include="image\codec\zed-palette-image.cpp" />
<ClCompile Include="image\color\cie1931.cpp" /> <ClCompile Include="image\color\cie1931.cpp" />
<ClCompile Include="image\color\color.cpp" /> <ClCompile Include="image\color\color.cpp" />
<ClCompile Include="image\filter\color.cpp" />
<ClCompile Include="image\filter\colors.cpp" />
<ClCompile Include="image\filter\convolution.cpp" /> <ClCompile Include="image\filter\convolution.cpp" />
<ClCompile Include="image\filter\dilate.cpp" /> <ClCompile Include="image\filter\dilate.cpp" />
<ClCompile Include="image\filter\median.cpp" /> <ClCompile Include="image\filter\median.cpp" />
@@ -427,4 +427,4 @@
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\msbuild\lolfx.targets" /> <Import Project="$(SolutionDir)\msbuild\lolfx.targets" />
</ImportGroup> </ImportGroup>
</Project>
</Project>

+ 2
- 2
src/lolcore.vcxproj.filters View File

@@ -343,7 +343,7 @@
<ClCompile Include="sys\thread.cpp"> <ClCompile Include="sys\thread.cpp">
<Filter>sys</Filter> <Filter>sys</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="image\filter\color.cpp">
<ClCompile Include="image\filter\colors.cpp">
<Filter>image\filter</Filter> <Filter>image\filter</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="image\filter\convolution.cpp"> <ClCompile Include="image\filter\convolution.cpp">
@@ -840,4 +840,4 @@
<ItemGroup> <ItemGroup>
<None Include="Makefile.am" /> <None Include="Makefile.am" />
</ItemGroup> </ItemGroup>
</Project>
</Project>

+ 6
- 0
src/platform/sdl/sdlinput.cpp View File

@@ -268,6 +268,7 @@ void SdlInputData::Tick(float seconds)
# endif # endif
{ {
//Lock management //Lock management
# if defined SDLOL_CapsLock && defined SDLOL_ScrollLock && defined SDLOL_NumLockClear
case SDLOL_CapsLock: case SDLOL_CapsLock:
case SDLOL_ScrollLock: case SDLOL_ScrollLock:
case SDLOL_NumLockClear: case SDLOL_NumLockClear:
@@ -294,7 +295,11 @@ void SdlInputData::Tick(float seconds)
m_keyboard->GetKey(sc2) ? "up" : "down", event.key.repeat); m_keyboard->GetKey(sc2) ? "up" : "down", event.key.repeat);
*/ */
} }
# endif
default: default:
# if USE_OLD_SDL
m_keyboard->SetKey(sc, event.type == SDL_KEYDOWN);
# else
if (ScanCodeIsValid(sc)) if (ScanCodeIsValid(sc))
{ {
m_keyboard->SetKey(sc, event.type == SDL_KEYDOWN); m_keyboard->SetKey(sc, event.type == SDL_KEYDOWN);
@@ -321,6 +326,7 @@ void SdlInputData::Tick(float seconds)
Log::Error("unknown keypress (sym 0x%02x, scancode %0d)\n", Log::Error("unknown keypress (sym 0x%02x, scancode %0d)\n",
event.key.keysym.sym, event.key.keysym.scancode); event.key.keysym.sym, event.key.keysym.scancode);
*/ */
# endif
} }
break; break;




Loading…
Cancel
Save