mirror of
				https://bitbucket.org/mfeemster/fractorium.git
				synced 2025-10-31 09:20:23 -04:00 
			
		
		
		
	 04e72c27de
			
		
	
	04e72c27de
	
	
	
		
			
			-Add a new dialog for editing QSS stylesheets. Allow for saving, reloading and setting styles as default. --Include a dark style with the installation called dark.qss. --Also add support for themes such as Fusion. --Resize some controls to better fit with the new style. -Add an option to specify the number of random embers generated on startup. 1 is the minimum and the default. --Bug fixes -Properly enable/disable thread priority label in final render dialog in response to enable/disable of the OpenCL checkbox. -Remove all inline stylesheets. -Show xaos spinners with 6 decimal places. --Code changes -Remove redundant comparisons to nullptr, use ! instead; -Give some controls valid names instead of the auto generated ones. -DoubleSpinBoxTableItemDelegate.h: Add virtual keyword to overridden functions.
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "FractoriumPch.h"
 | |
| #include "Fractorium.h"
 | |
| #include <QtWidgets/QApplication>
 | |
| 
 | |
| /// <summary>
 | |
| /// Main program entry point for Fractorium.exe.
 | |
| /// </summary>
 | |
| /// <param name="argc">The number of command line arguments passed</param>
 | |
| /// <param name="argv">The command line arguments passed</param>
 | |
| /// <returns>0 if successful, else 1.</returns>
 | |
| int main(int argc, char *argv[])
 | |
| {
 | |
| 	QApplication a(argc, argv);
 | |
| 
 | |
| #ifdef TEST_CL
 | |
| 	QMessageBox::critical(QApplication::desktop(), "Error", "Fractorium cannot be run in test mode, undefine TEST_CL first.");
 | |
| 	return 1;
 | |
| #endif
 | |
| 
 | |
| #ifdef ISAAC_FLAM3_DEBUG
 | |
| 	QMessageBox::critical(QApplication::desktop(), "Error", "Fractorium cannot be run in test mode, undefine ISAAC_FLAM3_DEBUG first.");
 | |
| 	return 1;
 | |
| #endif
 | |
| 
 | |
| 	//Required for large allocs, else GPU memory usage will be severely limited to small sizes.
 | |
| 	//This must be done in the application and not in the EmberCL DLL.
 | |
| #ifdef WIN32
 | |
| 	_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
 | |
| #else
 | |
| 	putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
 | |
| #endif
 | |
| 	
 | |
| 	int rv = -1;
 | |
| 
 | |
| 	try
 | |
| 	{
 | |
| 		Fractorium w;
 | |
| 		w.show();
 | |
| 		a.installEventFilter(&w);
 | |
| 		rv = a.exec();
 | |
| 	}
 | |
| 	catch (const std::exception& e)
 | |
| 	{
 | |
| 		QMessageBox::critical(0, "Fatal Error", QString::fromStdString(e.what()));
 | |
| 	}
 | |
| 	catch (const char* e)
 | |
| 	{
 | |
| 		QMessageBox::critical(0, "Fatal Error", e);
 | |
| 	}
 | |
| 
 | |
| 	return rv;
 | |
| }
 | |
| 
 |