mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-23 15:39:19 +02:00
catch exceptions in gfxrenderer init and other inits
This commit is contained in:
14
EU07.cpp
14
EU07.cpp
@@ -296,17 +296,15 @@ int main(int argc, char *argv[])
|
|||||||
::SendMessage( Hwnd, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>( icon ) );
|
::SendMessage( Hwnd, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>( icon ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( ( false == GfxRenderer.Init( window ) )
|
|
||||||
|| ( false == UILayer.init( window ) ) ) {
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
input::Keyboard.init();
|
|
||||||
input::Gamepad.init();
|
|
||||||
|
|
||||||
Global::pWorld = &World; // Ra: wskaźnik potrzebny do usuwania pojazdów
|
Global::pWorld = &World; // Ra: wskaźnik potrzebny do usuwania pojazdów
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if ((false == GfxRenderer.Init(window))
|
||||||
|
|| (false == UILayer.init(window)))
|
||||||
|
return -1;
|
||||||
|
input::Keyboard.init();
|
||||||
|
input::Gamepad.init();
|
||||||
|
|
||||||
if (!World.Init(window))
|
if (!World.Init(window))
|
||||||
{
|
{
|
||||||
std::cout << "failed to init TWorld" << std::endl;
|
std::cout << "failed to init TWorld" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user