Fixed --help command doing terrible things.

This commit is contained in:
Aloshi 2012-09-07 16:53:27 -05:00
parent 80740a2bd0
commit e479746bcb

View file

@ -19,22 +19,6 @@ namespace fs = boost::filesystem;
int main(int argc, char* argv[])
{
bcm_host_init();
bool running = true;
//ALWAYS INITIALIZE VIDEO. It starts SDL's event system, and without it, input won't work.
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) != 0)
{
std::cerr << "Error - could not initialize SDL!\n";
std::cerr << " " << SDL_GetError() << "\n";
std::cerr << "Are you in the 'video' and 'input' groups? Are you running with X closed? Is your firmware up to date?\n";
return 1;
}
SDL_Surface* sdlScreen = SDL_SetVideoMode(1, 1, 0, SDL_SWSURFACE);
std::cout << "Fake SDL window is " << sdlScreen->w << "x" << sdlScreen->h << "\n";
unsigned int width = 0;
unsigned int height = 0;
if(argc > 1)
@ -74,6 +58,24 @@ int main(int argc, char* argv[])
}
}
bcm_host_init();
bool running = true;
//ALWAYS INITIALIZE VIDEO. It starts SDL's event system, and without it, input won't work.
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) != 0)
{
std::cerr << "Error - could not initialize SDL!\n";
std::cerr << " " << SDL_GetError() << "\n";
std::cerr << "Are you in the 'video' and 'input' groups? Are you running with X closed? Is your firmware up to date?\n";
return 1;
}
SDL_Surface* sdlScreen = SDL_SetVideoMode(1, 1, 0, SDL_SWSURFACE);
std::cout << "Fake SDL window is " << sdlScreen->w << "x" << sdlScreen->h << "\n";
bool renderInit = Renderer::init(width, height);
if(!renderInit)
{