mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-19 23:40:15 +01:00
psvita: use crtlib where possible
This commit is contained in:
parent
fe3f15ad33
commit
70a73e47a7
@ -136,7 +136,7 @@ const char *Sys_GetCurrentUser( void )
|
||||
#elif XASH_PSVITA
|
||||
static string username;
|
||||
sceAppUtilSystemParamGetString( SCE_SYSTEM_PARAM_ID_USERNAME, username, sizeof( username ) - 1 );
|
||||
if( username[0] )
|
||||
if( !COM_CheckStringEmpty( username ) )
|
||||
return username;
|
||||
#elif XASH_POSIX && !XASH_ANDROID && !XASH_NSWITCH
|
||||
uid_t uid = geteuid();
|
||||
|
@ -36,6 +36,7 @@ GNU General Public License for more details.
|
||||
#include "dlight.h"
|
||||
#include "ref_api.h"
|
||||
#include "com_strings.h"
|
||||
#include "crtlib.h"
|
||||
#include "vgl_shim.h"
|
||||
|
||||
#define MAX_SHADERLEN 4096
|
||||
@ -136,17 +137,17 @@ static GLuint VGL_GenerateShader( const vgl_prog_t *prog, GLenum type )
|
||||
|
||||
for ( i = 0; i < VGL_FLAG_MAX; ++i )
|
||||
{
|
||||
snprintf( tmp, sizeof( tmp ), "#define %s %d\n", vgl_flag_name[i], prog->flags & ( 1 << i ) );
|
||||
strncat( shader, tmp, MAX_SHADERLEN );
|
||||
Q_snprintf( tmp, sizeof( tmp ), "#define %s %d\n", vgl_flag_name[i], prog->flags & ( 1 << i ) );
|
||||
Q_strncat( shader, tmp, MAX_SHADERLEN );
|
||||
}
|
||||
|
||||
if ( type == GL_FRAGMENT_SHADER )
|
||||
strncat( shader, vgl_frag_src, MAX_SHADERLEN );
|
||||
Q_strncat( shader, vgl_frag_src, MAX_SHADERLEN );
|
||||
else
|
||||
strncat( shader, vgl_vert_src, MAX_SHADERLEN );
|
||||
Q_strncat( shader, vgl_vert_src, MAX_SHADERLEN );
|
||||
|
||||
id = glCreateShader( type );
|
||||
len = strlen( shader );
|
||||
len = Q_strlen( shader );
|
||||
glShaderSource( id, 1, (const void *)&shader, &len );
|
||||
glCompileShader( id );
|
||||
glGetShaderiv( id, GL_COMPILE_STATUS, &status );
|
||||
|
Loading…
Reference in New Issue
Block a user