diff --git a/VERSION b/VERSION index 6c2ffb53..c48a8849 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-219-g3585e02993+1 \ No newline at end of file +a12-221-g40853e088f+1 \ No newline at end of file diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 53a8cd5f..b5ae3f5c 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -21,6 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "common/debug.h" #include "common/option.h" +#include "common/sysinfo.h" #include "utils.h" #include "dynamic/fonts.h" @@ -168,10 +169,18 @@ bool egl_initialize(void * opaque, Uint32 * sdlFlags) { *sdlFlags = SDL_WINDOW_OPENGL; SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER , 1); - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS , 1); - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES , 4); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + int maxSamples = sysinfo_gfx_max_multisample(); + if (maxSamples > 1) + { + if (maxSamples > 4) + maxSamples = 4; + + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, maxSamples); + } + return true; }