Print RGSS version on startup
This commit is contained in:
		
							parent
							
								
									55f1542c76
								
							
						
					
					
						commit
						6d414c0777
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								src/main.cpp
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								src/main.cpp
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -38,6 +38,8 @@
 | 
			
		|||
#include "binding.h"
 | 
			
		||||
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
rgssThreadError(RGSSThreadData *rtData, const std::string &msg)
 | 
			
		||||
| 
						 | 
				
			
			@ -158,6 +160,17 @@ int rgssThreadFun(void *userdata)
 | 
			
		|||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void printRgssVersion(int ver)
 | 
			
		||||
{
 | 
			
		||||
	const char *const makers[] =
 | 
			
		||||
		{ "", "XP", "VX", "VX Ace" };
 | 
			
		||||
 | 
			
		||||
	char buf[128];
 | 
			
		||||
	snprintf(buf, sizeof(buf), "RGSS version %d (%s)", ver, makers[ver]);
 | 
			
		||||
 | 
			
		||||
	Debug() << buf;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
	/* initialize SDL first */
 | 
			
		||||
| 
						 | 
				
			
			@ -192,6 +205,8 @@ int main(int argc, char *argv[])
 | 
			
		|||
	conf.read(argc, argv);
 | 
			
		||||
	conf.readGameINI();
 | 
			
		||||
 | 
			
		||||
	printRgssVersion(conf.rgssVersion);
 | 
			
		||||
 | 
			
		||||
	int imgFlags = IMG_INIT_PNG | IMG_INIT_JPG;
 | 
			
		||||
	if (IMG_Init(imgFlags) != imgFlags)
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue