Remove main update loop
This commit is contained in:
		
							parent
							
								
									b7c8011c52
								
							
						
					
					
						commit
						f20d7a43b1
					
				
					 2 changed files with 7 additions and 45 deletions
				
			
		
							
								
								
									
										15
									
								
								src/main.cpp
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								src/main.cpp
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -137,10 +137,12 @@ int rgssThreadFun(void *userdata)
 | 
			
		|||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	bool vsync = conf.vsync || conf.syncToRefreshrate;
 | 
			
		||||
	SDL_GL_SetSwapInterval(vsync ? 1 : 0);
 | 
			
		||||
 | 
			
		||||
	/* Start script execution */
 | 
			
		||||
	scriptBinding->execute();
 | 
			
		||||
 | 
			
		||||
#ifndef __EMSCRIPTEN__
 | 
			
		||||
	threadData->rqTermAck.set();
 | 
			
		||||
	threadData->ethread->requestTerminate();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -148,10 +150,6 @@ int rgssThreadFun(void *userdata)
 | 
			
		|||
 | 
			
		||||
	alcDestroyContext(alcCtx);
 | 
			
		||||
	SDL_GL_DeleteContext(glCtx);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	bool vsync = conf.vsync || conf.syncToRefreshrate;
 | 
			
		||||
	SDL_GL_SetSwapInterval(vsync ? 1 : 0);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -331,15 +329,8 @@ int main(int argc, char *argv[])
 | 
			
		|||
	/* Start event processing */
 | 
			
		||||
	eventThread.process(rtData);
 | 
			
		||||
 | 
			
		||||
#ifdef __EMSCRIPTEN__
 | 
			
		||||
	::rgssThreadFun(&rtData);
 | 
			
		||||
	printf("Exiting main function\n");
 | 
			
		||||
	return 0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	/* Start RGSS thread */
 | 
			
		||||
        rgssThreadFun(&rtData);
 | 
			
		||||
	return 0;
 | 
			
		||||
 | 
			
		||||
	/* Request RGSS thread to stop */
 | 
			
		||||
	rtData.rqTerm.set();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue