diff --git a/CMakeLists.txt b/CMakeLists.txt index 42a61f866..8827c367e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,7 +207,7 @@ endif() if(EMSCRIPTEN) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_SDL=2 -pthread") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s INITIAL_MEMORY=33554432 -s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=1 -s USE_SDL=2 \ - -pthread -s PTHREAD_POOL_SIZE=4 -s DEMANGLE_SUPPORT=1 -s USE_WEBGL2=1 -s FULL_ES2=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s ASYNCIFY \ + -pthread -s PTHREAD_POOL_SIZE=4 -s DEMANGLE_SUPPORT=1 -s USE_WEBGL2=1 -s FULL_ES3=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s ASYNCIFY \ --preload-file ${PROJECT_SOURCE_DIR}/resources@/home/web_user/.emulationstation/resources/ \ --preload-file ${PROJECT_SOURCE_DIR}/themes/rbsimple-DE@/home/web_user/.emulationstation/themes/rbsimple-DE/ \ --preload-file ${PROJECT_SOURCE_DIR}/ROMs@/home/web_user/ROMs/") diff --git a/es-core/src/renderers/RendererOpenGL.cpp b/es-core/src/renderers/RendererOpenGL.cpp index 60362d1be..ae8db3632 100644 --- a/es-core/src/renderers/RendererOpenGL.cpp +++ b/es-core/src/renderers/RendererOpenGL.cpp @@ -116,7 +116,11 @@ GLenum RendererOpenGL::convertTextureType(const TextureType type) #else case TextureType::BGRA: { return GL_BGRA; } break; #endif +#if defined(__EMSCRIPTEN__) + case TextureType::RED: { return GL_LUMINANCE; } break; +#else case TextureType::RED: { return GL_RED; } break; +#endif default: { return GL_ZERO; } } // clang-format on diff --git a/es-core/src/utils/PlatformUtil.cpp b/es-core/src/utils/PlatformUtil.cpp index 1f549c192..2fdced2fe 100644 --- a/es-core/src/utils/PlatformUtil.cpp +++ b/es-core/src/utils/PlatformUtil.cpp @@ -18,13 +18,11 @@ #include -#if defined(__APPLE__) -#include -#endif - #if !defined(_WIN64) #include #endif + +#include #include namespace Utils