add config option to set the window icon
This commit is contained in:
		
							parent
							
								
									a740f7754c
								
							
						
					
					
						commit
						5b4f0b239c
					
				
					 3 changed files with 13 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -67,6 +67,7 @@ void Config::read()
 | 
			
		|||
    PO_DESC(gameFolder, std::string) \
 | 
			
		||||
    PO_DESC(anyAltToggleFS, bool) \
 | 
			
		||||
    PO_DESC(allowSymlinks, bool) \
 | 
			
		||||
    PO_DESC(iconPath, std::string) \
 | 
			
		||||
    PO_DESC(customScript, std::string)
 | 
			
		||||
 | 
			
		||||
// Not gonna take your shit boost
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,6 +47,8 @@ struct Config
 | 
			
		|||
	bool anyAltToggleFS;
 | 
			
		||||
	bool allowSymlinks;
 | 
			
		||||
 | 
			
		||||
	std::string iconPath;
 | 
			
		||||
 | 
			
		||||
	std::string customScript;
 | 
			
		||||
	std::vector<std::string> rtps;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								src/main.cpp
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/main.cpp
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -297,6 +297,16 @@ int main(int, char *argv[])
 | 
			
		|||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (!conf.iconPath.empty())
 | 
			
		||||
	{
 | 
			
		||||
		SDL_Surface *iconImg = IMG_Load(conf.iconPath.c_str());
 | 
			
		||||
		if (iconImg)
 | 
			
		||||
		{
 | 
			
		||||
			SDL_SetWindowIcon(win, iconImg);
 | 
			
		||||
			SDL_FreeSurface(iconImg);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	EventThread eventThread;
 | 
			
		||||
	RGSSThreadData rtData(&eventThread, argv[0], win, conf);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue