mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 15:34:58 +00:00 
			
		
		
		
	Fixed bug #6698 - VISA: wrong check sceKernelPollSema
(cherry picked from commit f077c691930f70a2e826eb40cbd0e35a7465a4af)
This commit is contained in:
		
							parent
							
								
									0b7a9a8e9f
								
							
						
					
					
						commit
						b7cc4dce70
					
				| 
						 | 
				
			
			@ -80,15 +80,15 @@ void SDL_DestroySemaphore(SDL_sem *sem)
 | 
			
		|||
int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
 | 
			
		||||
{
 | 
			
		||||
    Uint32 *pTimeout;
 | 
			
		||||
    unsigned int res;
 | 
			
		||||
    int res;
 | 
			
		||||
 | 
			
		||||
    if (sem == NULL) {
 | 
			
		||||
        return SDL_InvalidParamError("sem");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (timeout == 0) {
 | 
			
		||||
        int res2 = sceKernelPollSema(sem->semid, 1);
 | 
			
		||||
        if (res2 < 0) {
 | 
			
		||||
        res = sceKernelPollSema(sem->semid, 1);
 | 
			
		||||
        if (res < 0) {
 | 
			
		||||
            return SDL_MUTEX_TIMEDOUT;
 | 
			
		||||
        }
 | 
			
		||||
        return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue