Added support for the newest NDK version

This commit is contained in:
Alexander Weinrauch 2017-09-19 21:20:07 +02:00 committed by Lukas Dürrenberger
parent 989367e345
commit 0da25a0b87
7 changed files with 56 additions and 70 deletions

View file

@ -28,6 +28,7 @@
#include <dlfcn.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <jni.h>
#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "sfml-activity", __VA_ARGS__))

View file

@ -43,7 +43,7 @@ std::streambuf::int_type LogcatStream::overflow (std::streambuf::int_type c)
if (c == "\n"[0])
{
m_message.push_back(c);
LOGE(m_message.c_str());
LOGE("%s", m_message.c_str());
m_message.clear();
}

View file

@ -243,10 +243,10 @@ EGLConfig EglContext::getBestConfig(EGLDisplay display, unsigned int bitsPerPixe
{
// Set our video settings constraint
const EGLint attributes[] = {
EGL_BUFFER_SIZE, bitsPerPixel,
EGL_DEPTH_SIZE, settings.depthBits,
EGL_STENCIL_SIZE, settings.stencilBits,
EGL_SAMPLE_BUFFERS, settings.antialiasingLevel,
EGL_BUFFER_SIZE, static_cast<EGLint>(bitsPerPixel),
EGL_DEPTH_SIZE, static_cast<EGLint>(settings.depthBits),
EGL_STENCIL_SIZE, static_cast<EGLint>(settings.stencilBits),
EGL_SAMPLE_BUFFERS, static_cast<EGLint>(settings.antialiasingLevel),
EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT,
EGL_NONE