mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
In a globally installed build, debug.txt is now placed in userdata directory. Needs testing still.
This commit is contained in:
@@ -115,6 +115,15 @@ u32 getTimeMs()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
/*
|
||||
Initialization
|
||||
*/
|
||||
|
||||
// Set locale. This is for forcing '.' as the decimal point.
|
||||
std::locale::global(std::locale("C"));
|
||||
// This enables printing all characters in bitmap font
|
||||
setlocale(LC_CTYPE, "en_US");
|
||||
|
||||
/*
|
||||
Low-level initialization
|
||||
*/
|
||||
@@ -124,20 +133,28 @@ int main(int argc, char *argv[])
|
||||
disable_stderr = true;
|
||||
#endif
|
||||
|
||||
porting::signal_handler_init();
|
||||
bool &kill = *porting::signal_handler_killstatus();
|
||||
|
||||
// Initialize porting::path_data and porting::path_userdata
|
||||
porting::initializePaths();
|
||||
|
||||
// Initialize debug streams
|
||||
debugstreams_init(disable_stderr, DEBUGFILE);
|
||||
#ifdef RUN_IN_PLACE
|
||||
std::string debugfile = DEBUGFILE;
|
||||
#else
|
||||
std::string debugfile = porting::path_userdata+"/"+DEBUGFILE;
|
||||
#endif
|
||||
debugstreams_init(disable_stderr, debugfile.c_str());
|
||||
// Initialize debug stacks
|
||||
debug_stacks_init();
|
||||
|
||||
DSTACK(__FUNCTION_NAME);
|
||||
|
||||
porting::signal_handler_init();
|
||||
bool &kill = *porting::signal_handler_killstatus();
|
||||
|
||||
porting::initializePaths();
|
||||
|
||||
// Init material properties table
|
||||
initializeMaterialProperties();
|
||||
|
||||
// Debug handler
|
||||
BEGIN_DEBUG_EXCEPTION_HANDLER
|
||||
|
||||
// Print startup message
|
||||
@@ -202,19 +219,10 @@ int main(int argc, char *argv[])
|
||||
// Initialize default settings
|
||||
set_default_settings();
|
||||
|
||||
// Set locale. This is for forcing '.' as the decimal point.
|
||||
std::locale::global(std::locale("C"));
|
||||
// This enables printing all characters in bitmap font
|
||||
setlocale(LC_CTYPE, "en_US");
|
||||
|
||||
// Initialize sockets
|
||||
sockets_init();
|
||||
atexit(sockets_cleanup);
|
||||
|
||||
/*
|
||||
Initialization
|
||||
*/
|
||||
|
||||
/*
|
||||
Read config file
|
||||
*/
|
||||
|
Reference in New Issue
Block a user