From ec25aeadbd13120a1af76271278ad0863402ac89 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Tue, 26 Oct 2021 19:59:36 -0500 Subject: Added more debugging Add some more print statements when we're starting up to get a better idea of what's failing. --- src/client/initdevice.cpp | 6 +++++- src/client/main.cpp | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/client/initdevice.cpp b/src/client/initdevice.cpp index 40a1e30..22b88d1 100644 --- a/src/client/initdevice.cpp +++ b/src/client/initdevice.cpp @@ -183,9 +183,13 @@ IrrlichtDevice* spawnIrrDevice(lua_State* L, char *path){ printf("Failed to open lua file:%s\n", filename); } settingsFromTable(L,&p); + printf("Creating device..."); IrrlichtDevice* dev = createDeviceEx(p); - if(!dev) + printf("[OK]\n"); + if(!dev){ + printf("Failed to create device\n"); exit(1); + } dev->setWindowCaption(L"Brokengine"); lua_pop(L,1); return dev; diff --git a/src/client/main.cpp b/src/client/main.cpp index 2d93828..d6184e0 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -153,20 +153,30 @@ int main(int argc, char *argv[]){ printf("Failed to initalize device\n"); return 1; } + printf("Changing working directory..."); device->getFileSystem()->changeWorkingDirectoryTo(path); + printf("[OK]\n"); //ILogger* log = device->getLogger(); //log->setLogLevel(ELL_NONE); //Loads libraries for interfaceing with irrlicht + printf("Loading lua libs..."); assert(lua_gettop(L) == 0); luaL_openlibs(state); assert(lua_gettop(L) == 0); + printf("[OK]\n"); + printf("Loading lua libs..."); loadIrrLibs(state,device); assert(lua_gettop(L) == 0); + printf("[OK]\n"); + printf("Loading networking libs..."); loadNetLibs(state); assert(lua_gettop(L) == 0); + printf("[OK]\n"); + printf("Loading shared libs..."); loadCommonLibs(state); assert(lua_gettop(L) == 0); - printf("Loadded irr libs...\n"); + printf("[OK]\n"); + printf("All libs loaded.\n"); //Sets the global event handeler printf("Creating event receiver\n"); GlobalEventReceiver ger = GlobalEventReceiver(device); -- cgit v1.2.3-70-g09d2