finished restructuring Sys_enable_input
This commit is contained in:
		
							parent
							
								
									746962454d
								
							
						
					
					
						commit
						4bef88aecc
					
				@ -176,9 +176,8 @@ HRESULT Sys_enable_input(void)
 | 
			
		||||
  if (ts_fd < 0)
 | 
			
		||||
  {
 | 
			
		||||
    rc = ERRNO_AS_SCODE;
 | 
			
		||||
    Mq_destroy(Sys_Queue);
 | 
			
		||||
    Log(LFATAL, "Unable to open touchscreen device %s (%08X).", Gconfig.touchscreen_device, rc);
 | 
			
		||||
    return rc;
 | 
			
		||||
    goto error_0;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  running = 1;
 | 
			
		||||
@ -186,20 +185,20 @@ HRESULT Sys_enable_input(void)
 | 
			
		||||
  if (threadrc != 0)
 | 
			
		||||
  {
 | 
			
		||||
    rc = SCODE_FROM_ERRNO(threadrc);
 | 
			
		||||
    close(ts_fd);
 | 
			
		||||
    ts_fd = -1;
 | 
			
		||||
    Mq_destroy(Sys_Queue);
 | 
			
		||||
    Log(LFATAL, "Unable to start system input thread (%08X).", rc);
 | 
			
		||||
	goto error_1;
 | 
			
		||||
  }
 | 
			
		||||
  if (SUCCEEDED(rc))
 | 
			
		||||
  {
 | 
			
		||||
  
 | 
			
		||||
  rc = Config_exitfunc(do_disable_input);
 | 
			
		||||
  if (FAILED(rc))
 | 
			
		||||
	do_disable_input();
 | 
			
		||||
  }
 | 
			
		||||
  return rc;
 | 
			
		||||
 | 
			
		||||
error_1:  
 | 
			
		||||
  close(ts_fd);
 | 
			
		||||
  ts_fd = -1;
 | 
			
		||||
error_0:
 | 
			
		||||
  Mq_destroy(Sys_Queue);
 | 
			
		||||
  return rc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user