2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-23 02:15:55 +01:00

ref: move GLES driver hint to SetAttribute as we don't choose GLES renderer in compile-time anymore

This commit is contained in:
Alibek Omarov 2019-04-04 22:43:33 +03:00
parent 84761e62ff
commit a9cf3357c7
2 changed files with 10 additions and 3 deletions

View File

@ -819,9 +819,6 @@ void Host_InitCommon( int argc, char **argv, const char *progname, qboolean bCha
host.type = HOST_DEDICATED;
}
SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
#if defined XASH_GLES && !defined __EMSCRIPTEN__ && !TARGET_OS_IOS
SDL_SetHint( SDL_HINT_OPENGL_ES_DRIVER, "1" );
#endif
SDL_StopTextInput();
#endif

View File

@ -501,6 +501,16 @@ void GL_SwapBuffers()
int GL_SetAttribute( int attr, int val )
{
switch( attr )
{
case REF_GL_CONTEXT_PROFILE_MASK:
if( val == REF_GL_CONTEXT_PROFILE_ES )
SDL_SetHint( SDL_HINT_OPENGL_ES_DRIVER, "1" );
break;
default:
break;
}
return SDL_GL_SetAttribute( (SDL_GLattr)attr, val );
}