build 170524. re-enabled support for -e3d command line option

This commit is contained in:
tmj-fstate
2017-05-23 23:57:29 +02:00
parent 9f07e2b504
commit 03e231fbc1
7 changed files with 138 additions and 104 deletions

View File

@@ -383,9 +383,15 @@ int main(int argc, char *argv[])
input::Gamepad.init();
Global::pWorld = &World; // Ra: wskaźnik potrzebny do usuwania pojazdów
if (!World.Init(window))
{
ErrorLog( "Failed to init TWorld" );
try {
if( false == World.Init( window ) ) {
ErrorLog( "Failed to init TWorld" );
return -1;
}
}
catch( std::bad_alloc const &Error ) {
ErrorLog( "Critical error, memory allocation failure: " + std::string( Error.what() ) );
return -1;
}
@@ -406,15 +412,23 @@ int main(int argc, char *argv[])
} // po zrobieniu E3D odpalamy normalnie scenerię, by ją zobaczyć
Console::On(); // włączenie konsoli
while (!glfwWindowShouldClose(window)
&& World.Update()
&& GfxRenderer.Render())
{
glfwPollEvents();
if( true == Global::InputGamepad ) {
input::Gamepad.poll();
try {
while( ( false == glfwWindowShouldClose( window ) )
&& ( true == World.Update() )
&& ( true == GfxRenderer.Render() ) ) {
glfwPollEvents();
if( true == Global::InputGamepad ) {
input::Gamepad.poll();
}
}
}
catch( std::bad_alloc const &Error ) {
ErrorLog( "Critical error, memory allocation failure: " + std::string( Error.what() ) );
return -1;
}
Console::Off(); // wyłączenie konsoli (komunikacji zwrotnej)
}