AerofoilX logging fixes

This commit is contained in:
elasota
2021-04-27 10:38:09 -04:00
parent 80683464af
commit 472462c535
2 changed files with 18 additions and 3 deletions

View File

@@ -29,14 +29,26 @@ IGpInputDriver *GpDriver_CreateInputDriver_SDL2_Gamepad(const GpInputDriverPrope
SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[])
{
GpLogDriver_X::Init();
bool enableLogging = false;
for (int i = 1; i < argc; i++)
{
if (!strcmp(argv[i], "-diagnostics"))
enableLogging = true;
}
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0)
return -1;
GpFileSystem_X::GetInstance()->Init();
IGpLogDriver *logger = GpLogDriver_X::GetInstance();
IGpLogDriver *logger = nullptr;
if (enableLogging)
{
GpLogDriver_X::Init();
logger = GpLogDriver_X::GetInstance();
}
GpDriverCollection *drivers = GpAppInterface_Get()->PL_GetDriverCollection();
drivers->SetDriver<GpDriverIDs::kFileSystem>(GpFileSystem_X::GetInstance());