<commit_before>//EmulationStation, a graphical front-end for ROM browsing. Created by Alec "Aloshi" Lofquist.
//http://www.aloshi.com

#ifdef _RPI_
	#include <bcm_host.h>
#endif

///////////////////////////////////////////
#include "globals.h"

#include "MVC/Controller/AudioController.h"
#include "MVC/Controller/GamingController.h"
#include "MVC/Controller/InputController.h"
#include "MVC/Controller/LogController.h"
#include "MVC/Controller/RenderController.h"
#include "MVC/Controller/ResourceController.h"
#include "MVC/Controller/ScraperController.h"
#include "MVC/Controller/SettingsController.h"

///////////////////////////////////////////

using namespace RetroEnd;

bool parseArgs(int argc, char* argv[])
{
	if(argc > 1)
	{
		for(int i = 1; i < argc; i++)
		{
			//TODO update settings
		}
	}

	return true;
}

//called on start
void onStart()
{
	//start log controller
	Controller::LogController::getInstance().start(); //first
	Controller::LogController::getInstance().setReportingLevel(LogLevel::Debug); //TODO by settings or command line

	LOG(LogLevel::Info,  "***** WELCOME TO RETRO-END *****");

	//start any other controllers
	//the order is mandatory
	Controller::SettingsController::getInstance().start();
	Controller::GamingController::getInstance().start();
	Controller::ResourceController::getInstance().start();
	Controller::ScraperController::getInstance().start();
	Controller::RenderController::getInstance().start();
	Controller::InputController::getInstance().start();
	Controller::AudioController::getInstance().start();
}

//called on exit
void onExit()
{
	#ifdef _RPI_
		bcm_host_deinit();
	#endif

	//stop any other controllers
	Controller::SettingsController::getInstance().stop();
	Controller::ScraperController::getInstance().stop();
	Controller::GamingController::getInstance().stop();
	Controller::AudioController::getInstance().stop();
	Controller::InputController::getInstance().stop();
	Controller::RenderController::getInstance().stop();
	
	LOG(LogLevel::Info,  "***** RETRO-END IS CLOSING *****");

	//stop log controller
	Controller::LogController::getInstance().stop(); //last
}

int main(int argc, char* argv[])
{
	//starts any controller
	onStart();<commit_msg>Going to Raspberry PI -> Back to SDL (1)<commit_after>//EmulationStation, a graphical front-end for ROM browsing. Created by Alec "Aloshi" Lofquist.
//http://www.aloshi.com

#ifdef _RPI_
	#include <bcm_host.h>
#endif

///////////////////////////////////////////
#include "globals.h"

#include "MVC/Controller/AudioController.h"
#include "MVC/Controller/GamingController.h"
#include "MVC/Controller/InputController.h"
#include "MVC/Controller/LogController.h"
#include "MVC/Controller/RenderController.h"
#include "MVC/Controller/ResourceController.h"
#include "MVC/Controller/ScraperController.h"
#include "MVC/Controller/SettingsController.h"

///////////////////////////////////////////

using namespace RetroEnd;

bool parseArgs(int argc, char* argv[])
{
	if(argc > 1)
	{
		for(int i = 1; i < argc; i++)
		{
			//TODO update settings
		}
	}

	return true;
}

//called on start
void onStart()
{
	//start log controller
	Controller::LogController::getInstance().start(); //first
	Controller::LogController::getInstance().setReportingLevel(LogLevel::Debug); //TODO by settings or command line

	LOG(LogLevel::Info,  "***** WELCOME TO RETRO-END *****");

	//start any other controllers
	//the order is mandatory
	Controller::RenderController::getInstance().start();
	Controller::SettingsController::getInstance().start();
	Controller::GamingController::getInstance().start();
	Controller::ResourceController::getInstance().start();
	Controller::ScraperController::getInstance().start();
	Controller::InputController::getInstance().start();
	Controller::AudioController::getInstance().start();
}

//called on exit
void onExit()
{
	#ifdef _RPI_
		bcm_host_deinit();
	#endif

	//stop any other controllers
	Controller::SettingsController::getInstance().stop();
	Controller::ScraperController::getInstance().stop();
	Controller::GamingController::getInstance().stop();
	Controller::AudioController::getInstance().stop();
	Controller::InputController::getInstance().stop();
	Controller::RenderController::getInstance().stop();
	
	LOG(LogLevel::Info,  "***** RETRO-END IS CLOSING *****");

	//stop log controller
	Controller::LogController::getInstance().stop(); //last
}

int main(int argc, char* argv[])
{
	//starts any controller
	onStart();
{'fraction_non_alphanumeric': 0.19608724983134698, 'fraction_numerical': 0.001124353496739375, 'mean_word_length': 4.852631578947369, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1719438', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1272, 'n_words': 266}