mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-22 21:04:14 +00: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
|
#elif XASH_PSVITA
|
||||||
static string username;
|
static string username;
|
||||||
sceAppUtilSystemParamGetString( SCE_SYSTEM_PARAM_ID_USERNAME, username, sizeof( username ) - 1 );
|
sceAppUtilSystemParamGetString( SCE_SYSTEM_PARAM_ID_USERNAME, username, sizeof( username ) - 1 );
|
||||||
if( username[0] )
|
if( !COM_CheckStringEmpty( username ) )
|
||||||
return username;
|
return username;
|
||||||
#elif XASH_POSIX && !XASH_ANDROID && !XASH_NSWITCH
|
#elif XASH_POSIX && !XASH_ANDROID && !XASH_NSWITCH
|
||||||
uid_t uid = geteuid();
|
uid_t uid = geteuid();
|
||||||
|
@ -36,6 +36,7 @@ GNU General Public License for more details.
|
|||||||
#include "dlight.h"
|
#include "dlight.h"
|
||||||
#include "ref_api.h"
|
#include "ref_api.h"
|
||||||
#include "com_strings.h"
|
#include "com_strings.h"
|
||||||
|
#include "crtlib.h"
|
||||||
#include "vgl_shim.h"
|
#include "vgl_shim.h"
|
||||||
|
|
||||||
#define MAX_SHADERLEN 4096
|
#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 )
|
for ( i = 0; i < VGL_FLAG_MAX; ++i )
|
||||||
{
|
{
|
||||||
snprintf( tmp, sizeof( tmp ), "#define %s %d\n", vgl_flag_name[i], prog->flags & ( 1 << i ) );
|
Q_snprintf( tmp, sizeof( tmp ), "#define %s %d\n", vgl_flag_name[i], prog->flags & ( 1 << i ) );
|
||||||
strncat( shader, tmp, MAX_SHADERLEN );
|
Q_strncat( shader, tmp, MAX_SHADERLEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( type == GL_FRAGMENT_SHADER )
|
if ( type == GL_FRAGMENT_SHADER )
|
||||||
strncat( shader, vgl_frag_src, MAX_SHADERLEN );
|
Q_strncat( shader, vgl_frag_src, MAX_SHADERLEN );
|
||||||
else
|
else
|
||||||
strncat( shader, vgl_vert_src, MAX_SHADERLEN );
|
Q_strncat( shader, vgl_vert_src, MAX_SHADERLEN );
|
||||||
|
|
||||||
id = glCreateShader( type );
|
id = glCreateShader( type );
|
||||||
len = strlen( shader );
|
len = Q_strlen( shader );
|
||||||
glShaderSource( id, 1, (const void *)&shader, &len );
|
glShaderSource( id, 1, (const void *)&shader, &len );
|
||||||
glCompileShader( id );
|
glCompileShader( id );
|
||||||
glGetShaderiv( id, GL_COMPILE_STATUS, &status );
|
glGetShaderiv( id, GL_COMPILE_STATUS, &status );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user