emscripten fixes.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2017-08-05 14:45:59 -03:00
parent eaf4fa3a81
commit dbb9814420
3 changed files with 5 additions and 2 deletions

View File

@@ -442,7 +442,7 @@ function build_link_configuration( package_name, use_ee_icon )
configuration "emscripten"
linkoptions{ "-O1 -s TOTAL_MEMORY=67108864 -s ASM_JS=1 -s VERBOSE=1 -s DISABLE_EXCEPTION_CATCHING=0 -s USE_SDL=2" }
buildoptions { "-fno-strict-aliasing -O2 -ffast-math" }
buildoptions { "-fno-strict-aliasing -O2 -ffast-math -s USE_SDL=2" }
if _OPTIONS["with-gles1"] and ( not _OPTIONS["with-gles2"] or _OPTIONS["force-gles1"] ) then
linkoptions{ "-s LEGACY_GL_EMULATION=1" }

View File

@@ -13,7 +13,8 @@ static Uint32 KeyCodesTable[ SDL_NUM_SCANCODES ];
static bool KeyCodesTableInit = false;
InputSDL::InputSDL( EE::Window::Window * window ) :
Input( window, eeNew( JoystickManagerSDL, () ) )
Input( window, eeNew( JoystickManagerSDL, () ) ),
mDPIScale(1.f)
{
#if defined( EE_X11_PLATFORM )
mMouseSpeed = 1.75f;

View File

@@ -130,9 +130,11 @@ bool WindowSDL::create( WindowSettings Settings, ContextSettings Context ) {
mWindow.Flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
#if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN
#if SDL_VERSION_ATLEAST(2,0,1)
mWindow.Flags |= SDL_WINDOW_ALLOW_HIGHDPI;
#endif
#endif
if ( mWindow.WindowConfig.Style & WindowStyle::Resize ) {
mWindow.Flags |= SDL_WINDOW_RESIZABLE;