This commit is contained in:
twinaphex 2020-06-29 05:41:25 +02:00
parent b34b29a22f
commit a657ad7039
3 changed files with 27 additions and 27 deletions

View File

@ -82,9 +82,8 @@ void __attribute__((weak)) __libctru_init(void (*retAddr)(void))
{
/* Store the return address */
__system_retAddr = NULL;
if (envIsHomebrew()) {
if (envIsHomebrew())
__system_retAddr = retAddr;
}
/* Initialize the synchronization subsystem */
__sync_init();

View File

@ -28,11 +28,12 @@ void GPU_Reset(u32* gxbuf, u32* gpuBuf, u32 gpuBufSize)
void GPU_SetFloatUniform(GPU_SHADER_TYPE type,
u32 startreg, u32* data, u32 numreg)
{
int regOffset;
int regOffset = 0x0;;
if (!data)
return;
regOffset = (type == GPU_GEOMETRY_SHADER) ? (-0x30) : (0x0);
if (type == GPU_GEOMETRY_SHADER)
regOffset = (-0x30);
GPUCMD_AddWrite(GPUREG_VSH_FLOATUNIFORM_CONFIG+regOffset,
0x80000000 | startreg);
@ -266,7 +267,6 @@ void GPU_SetTexEnv(u8 id, u16 rgbSources, u16 alphaSources, u16 rgbOperands, u16
u32 param[0x5];
if(id > 6)
return;
memset(param, 0x00, 5*4);
param[0x0] = (alphaSources << 16) | (rgbSources);
param[0x1] = (alphaOperands << 12) | (rgbOperands);

View File

@ -385,7 +385,8 @@ static ssize_t sd_fat_read_r (struct _reent *r, void* fd, char *ptr, size_t len)
static int sd_fat_fstat_r (struct _reent *r, void* fd, struct stat *st)
{
sd_fat_file_state_t *file = (sd_fat_file_state_t *)fd;
if(!file->dev) {
if(!file->dev)
{
r->_errno = ENODEV;
return -1;
}