mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-10-31 17:20:32 +00:00 
			
		
		
		
	Return static function
This commit is contained in:
		
							parent
							
								
									0a1a7c1955
								
							
						
					
					
						commit
						db72d255b0
					
				
					 1 changed files with 13 additions and 9 deletions
				
			
		|  | @ -18,16 +18,20 @@ do | |||
|     local w | ||||
|     local dt | ||||
|     local systemsNames | ||||
|     local system | ||||
| 
 | ||||
|     local function run(system) | ||||
|     local function profile() | ||||
|         local name = systemsNames[system] | ||||
| 
 | ||||
|         return function() | ||||
|             debug.profilebegin(name) | ||||
|             debug.setmemorycategory(name) | ||||
|             system(w, dt) | ||||
|             debug.profileend() | ||||
|         end | ||||
|         debug.profilebegin(name) | ||||
|         debug.setmemorycategory(name) | ||||
|         system(w, dt) | ||||
|         debug.profileend() | ||||
|     end | ||||
| 
 | ||||
|     local function run(sys) | ||||
|         system = sys | ||||
|         return profile | ||||
|     end | ||||
| 
 | ||||
|     local function loop(sinceLastFrame) | ||||
|  | @ -55,9 +59,9 @@ do | |||
|     				.. debug.info(system, "n") | ||||
|     				.. " has been ejected" | ||||
| 				) | ||||
| 				continue | ||||
| 			else | ||||
| 			    LOOP_ERROR(why) | ||||
| 			end | ||||
| 			LOOP_ERROR(why) | ||||
|         end | ||||
| 
 | ||||
|         debug.profileend() | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue