Emscripten fixes

This commit is contained in:
Joshua Granick
2013-12-26 16:53:58 -08:00
parent dd508accca
commit 5000fa42c0
5 changed files with 25 additions and 5 deletions

View File

@@ -537,8 +537,8 @@
<lib name="${THIRDPARTY_LIBS}libz${name_extra}${SLIBEXT}" if="linux" unless="dynamic_sdl"/>
<lib name="${THIRDPARTY_LIBS}libz${name_extra}${SLIBEXT}" if="tizen" />
<lib name="${THIRDPARTY_LIBS}libSDL_mixer${name_extra}${SLIBEXT}" if="sdl" unless="dynamic_sdl" />
<lib name="${THIRDPARTY_LIBS}libSDL_image${name_extra}${SLIBEXT}" if="sdl_image" unless="emscripten" />
<lib name="${THIRDPARTY_LIBS}libSDL_mixer${name_extra}${SLIBEXT}" if="sdl" unless="dynamic_sdl || emscripten" />
<lib name="${THIRDPARTY_LIBS}libSDL_image${name_extra}${SLIBEXT}" if="sdl_image" unless="dynamic_sdl || emscripten" />
<lib name="${THIRDPARTY_LIBS}libSDL${name_extra}${SLIBEXT}" if="sdl_static" unless="blackberry" />
<lib name="${THIRDPARTY_LIBS}libSDL2${name_extra}${SLIBEXT}" if="sdl2" />
<!-- <lib name="${THIRDPARTY_LIBS}libSDL2main${name_extra}${SLIBEXT}" if="windows" unless="sdl" /> -->

View File

@@ -1,5 +1,6 @@
#include <string>
#include <cstdlib>
#include <vector>
namespace lime {
@@ -74,4 +75,17 @@ namespace lime {
}
std::string FileDialogFolder( const std::string &title, const std::string &text ) {
return "";
}
std::string FileDialogOpen( const std::string &title, const std::string &text, const std::vector<std::string> &fileTypes ) {
return "";
}
std::string FileDialogSave( const std::string &title, const std::string &text, const std::vector<std::string> &fileTypes ) {
return "";
}
}

View File

@@ -65,7 +65,9 @@ DEFINE_PRIM(lime_gl_enable,1);
value lime_gl_disable(value inCap)
{
#ifndef LIME_FORCE_GLES2
glDisable(val_int(inCap));
#endif
return alloc_null();
}
DEFINE_PRIM(lime_gl_disable,1);

View File

@@ -238,10 +238,12 @@ namespace lime {
void OpenGLContext::FinishBitmapRender () {
#ifndef LIME_FORCE_GLES2
glDisable (GL_TEXTURE_2D);
#ifdef LIME_DITHER
glEnable (GL_DITHER);
#endif
#endif
}
@@ -455,10 +457,12 @@ namespace lime {
if (boundTexture) {
boundTexture->BindFlags (draw.mBitmapRepeat, draw.mBitmapSmooth);
#ifndef LIME_FORCE_GLES2
#ifdef LIME_DITHER
if (!inSmooth)
glDisable (GL_DITHER);
#endif
#endif
} else {