@@ -52,30 +52,18 @@ void xrCore::_initialize (LPCSTR _ApplicationName, xrLogger::LogCallback cb, BOO
5252 LoadParams ();
5353#endif
5454
55- string_path fn,dr,di;
56-
5755 // application path
58- #ifdef IXR_WINDOWS
59- GetModuleFileNameA (GetModuleHandleA (MODULE_NAME),fn,sizeof (fn));
60- _splitpath (fn,dr,di,0 ,0 );
61- xr_strconcat (ApplicationPath,dr,di);
62-
63- GetCurrentDirectoryA (sizeof (WorkingPath),WorkingPath);
64- #else
65- xr_strcpy (ApplicationPath, SDL_GetBasePath ());
66- xr_strcpy (WorkingPath, SDL_GetBasePath ());
67- #endif
56+ std::string ApplicationPath = Platform::GetBinaryFolderPath ().string ();
57+ std::string WorkingPath = std::filesystem::current_path ().string ();
6858
69- xr_strcpy (g_application_path,sizeof (g_application_path),ApplicationPath);
59+ xr_strcpy (g_application_path, sizeof (g_application_path), ApplicationPath. c_str () );
7060
7161 // User/Comp Name
72- #ifdef IXR_WINDOWS
73- DWORD sz_user = sizeof (UserName);
74- GetUserNameA (UserName,&sz_user);
62+ std::string user_name = Platform::GetUsrName ();
63+ std::string comp_name = Platform::GetCompName ();
7564
76- DWORD sz_comp = sizeof (CompName);
77- GetComputerNameA (CompName,&sz_comp);
78- #endif
65+ xr_strcpy (UserName, sizeof (UserName), user_name.c_str ());
66+ xr_strcpy (CompName, sizeof (CompName), comp_name.c_str ());
7967
8068 // Mathematics & PSI detection
8169 CPU::Detect ();
0 commit comments