mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-18 12:55:38 +00:00
Fixed --help command doing terrible things.
This commit is contained in:
parent
80740a2bd0
commit
e479746bcb
34
src/main.cpp
34
src/main.cpp
|
@ -19,22 +19,6 @@ namespace fs = boost::filesystem;
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
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 width = 0;
|
||||||
unsigned int height = 0;
|
unsigned int height = 0;
|
||||||
if(argc > 1)
|
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);
|
bool renderInit = Renderer::init(width, height);
|
||||||
if(!renderInit)
|
if(!renderInit)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue