@@ -164,7 +164,7 @@ void Application::exit(int exitCode) {
164
164
165
165
vector<string> backtraceLines;
166
166
auto backtraceHeaderLine = " windowsExceptionHandler(): process " + to_string ((uint64_t )process) + " crashed: Printing stacktrace(thread " + to_string ((uint64_t )thread) + " )" ;
167
- Console::println (backtraceHeaderLine);
167
+ Console::printLine (backtraceHeaderLine);
168
168
backtraceLines.push_back (backtraceHeaderLine);
169
169
170
170
CHAR _pathToExecutable[MAX_PATH];
@@ -174,11 +174,11 @@ void Application::exit(int exitCode) {
174
174
#if defined(_MSC_VER) == false
175
175
auto addr2lineToolCmd = StringTools::substring (pathToExecutable, 0 , StringTools::lastIndexOf (pathToExecutable, ' \\ ' )) + " \\ addr2line.exe" ;
176
176
if (FileSystem::getInstance ()->exists (addr2lineToolCmd) == false ) {
177
- Console::println (" handler(): " + addr2lineToolCmd + " : not found! Please copy addr2line utility to binary location!" );
177
+ Console::printLine (" handler(): " + addr2lineToolCmd + " : not found! Please copy addr2line utility to binary location!" );
178
178
mutex.unlock ();
179
179
180
180
//
181
- Console::println ();
181
+ Console::printLine ();
182
182
183
183
// shutdown console
184
184
Console::shutdown ();
@@ -190,7 +190,7 @@ void Application::exit(int exitCode) {
190
190
#endif
191
191
192
192
auto backtraceExecutableLine = " windowsExceptionHandler(): path to executable: " + pathToExecutable;
193
- Console::println (backtraceExecutableLine);
193
+ Console::printLine (backtraceExecutableLine);
194
194
backtraceLines.push_back (backtraceExecutableLine);
195
195
196
196
pathToExecutable = string (" \" " ) + StringTools::replace (pathToExecutable, " \\ " , " \\\\ " ) + " \" " ;
@@ -310,15 +310,15 @@ void Application::exit(int exitCode) {
310
310
addr2LineOutput = StringTools::replace (StringTools::replace (addr2LineOutput, addr2lineFunctionName, RTTI::demangle (addr2lineFunctionName.c_str ())), " \n " , " " );
311
311
}
312
312
auto backtraceLine = to_string (frameIdx) + " : " + addr2LineOutput;
313
- Console::println (backtraceLine);
313
+ Console::printLine (backtraceLine);
314
314
backtraceLines.push_back (backtraceLine);
315
315
} else {
316
316
auto backtraceLine = to_string (frameIdx) + " : " + string (RTTI::demangle (_functionName)) + " at " + fileName + " :" + to_string (line);
317
- Console::println (backtraceLine);
317
+ Console::printLine (backtraceLine);
318
318
backtraceLines.push_back (backtraceLine);
319
319
}
320
320
#else
321
- Console::println (to_string (frameIdx) + " : " + functionName + " at " + fileName + " :" + to_string (line));
321
+ Console::printLine (to_string (frameIdx) + " : " + functionName + " at " + fileName + " :" + to_string (line));
322
322
#endif
323
323
frameIdx++;
324
324
}
@@ -330,7 +330,7 @@ void Application::exit(int exitCode) {
330
330
331
331
mutex.unlock ();
332
332
333
- Console::println ();
333
+ Console::printLine ();
334
334
335
335
// shutdown console
336
336
Console::shutdown ();
@@ -538,7 +538,7 @@ void Application::setClipboardContent(const string& content) {
538
538
}
539
539
540
540
static void glfwErrorCallback (int error, const char * description) {
541
- Console::println (string (" glfwErrorCallback(): " ) + description);
541
+ Console::printLine (string (" glfwErrorCallback(): " ) + description);
542
542
}
543
543
544
544
int Application::run (int argc, char ** argv, const string& title, InputEventHandler* inputEventHandler, int windowHints) {
@@ -567,7 +567,7 @@ int Application::run(int argc, char** argv, const string& title, InputEventHandl
567
567
Application::inputEventHandler = inputEventHandler;
568
568
glfwSetErrorCallback (glfwErrorCallback);
569
569
if (glfwInit () == false ) {
570
- Console::println (" glflInit(): failed!" );
570
+ Console::printLine (" glflInit(): failed!" );
571
571
return EXITCODE_FAILURE;
572
572
}
573
573
@@ -592,29 +592,29 @@ int Application::run(int argc, char** argv, const string& title, InputEventHandl
592
592
}
593
593
594
594
//
595
- Console::println (" Application::run(): Opening renderer library: " + rendererLibrary);
595
+ Console::printLine (" Application::run(): Opening renderer library: " + rendererLibrary);
596
596
597
597
// load renderer library
598
598
#if defined(_MSC_VER)
599
599
//
600
600
auto rendererLibraryHandle = LoadLibrary (rendererLibrary.c_str ());
601
601
if (rendererLibraryHandle == nullptr ) {
602
- Console::println (" Application::run(): Could not open renderer library" );
602
+ Console::printLine (" Application::run(): Could not open renderer library" );
603
603
glfwTerminate ();
604
604
return EXITCODE_FAILURE;
605
605
}
606
606
//
607
607
Renderer* (*rendererCreateInstance)() = (Renderer*(*)())GetProcAddress (rendererLibraryHandle, " createInstance" );
608
608
//
609
609
if (rendererCreateInstance == nullptr ) {
610
- Console::println (" Application::run(): Could not find renderer library createInstance() entry point" );
610
+ Console::printLine (" Application::run(): Could not find renderer library createInstance() entry point" );
611
611
glfwTerminate ();
612
612
return EXITCODE_FAILURE;
613
613
}
614
614
//
615
615
renderer = (Renderer*)rendererCreateInstance ();
616
616
if (renderer == nullptr ) {
617
- Console::println (" Application::run(): Could not create renderer" );
617
+ Console::printLine (" Application::run(): Could not create renderer" );
618
618
glfwTerminate ();
619
619
return EXITCODE_FAILURE;
620
620
}
@@ -626,22 +626,22 @@ int Application::run(int argc, char** argv, const string& title, InputEventHandl
626
626
auto rendererLibraryHandle = dlopen (rendererLibrary.c_str (), RTLD_NOW);
627
627
#endif
628
628
if (rendererLibraryHandle == nullptr ) {
629
- Console::println (" Application::run(): Could not open renderer library" );
629
+ Console::printLine (" Application::run(): Could not open renderer library" );
630
630
glfwTerminate ();
631
631
return EXITCODE_FAILURE;
632
632
}
633
633
//
634
634
Renderer* (*rendererCreateInstance)() = (Renderer*(*)())dlsym (rendererLibraryHandle, " createInstance" );
635
635
//
636
636
if (rendererCreateInstance == nullptr ) {
637
- Console::println (" Application::run(): Could not find renderer library createInstance() entry point" );
637
+ Console::printLine (" Application::run(): Could not find renderer library createInstance() entry point" );
638
638
glfwTerminate ();
639
639
return EXITCODE_FAILURE;
640
640
}
641
641
//
642
642
renderer = (Renderer*)rendererCreateInstance ();
643
643
if (renderer == nullptr ) {
644
- Console::println (" Application::run(): Could not create renderer" );
644
+ Console::printLine (" Application::run(): Could not create renderer" );
645
645
glfwTerminate ();
646
646
return EXITCODE_FAILURE;
647
647
}
@@ -661,14 +661,14 @@ int Application::run(int argc, char** argv, const string& title, InputEventHandl
661
661
662
662
//
663
663
if (glfwWindow == nullptr ) {
664
- Console::println (" glfwCreateWindow(): Could not create window" );
664
+ Console::printLine (" glfwCreateWindow(): Could not create window" );
665
665
glfwTerminate ();
666
666
return EXITCODE_FAILURE;
667
667
}
668
668
669
669
//
670
670
if (renderer->initializeWindowSystemRendererContext (glfwWindow) == false ) {
671
- Console::println (" glfwCreateWindow(): Could not initialize window system renderer context" );
671
+ Console::printLine (" glfwCreateWindow(): Could not initialize window system renderer context" );
672
672
glfwTerminate ();
673
673
return EXITCODE_FAILURE;
674
674
}
@@ -709,7 +709,7 @@ int Application::run(int argc, char** argv, const string& title, InputEventHandl
709
709
auto gameControllerDatabase = FileSystem::getInstance ()->getContentAsString (" resources/engine/misc" , " gamecontrollerdb.txt" );
710
710
glfwUpdateGamepadMappings (gameControllerDatabase.c_str ());
711
711
} catch (Exception& exception ) {
712
- Console::println (" An error occurred: " + string (exception .what ()));
712
+ Console::printLine (" An error occurred: " + string (exception .what ()));
713
713
}
714
714
715
715
//
@@ -731,7 +731,7 @@ int Application::run(int argc, char** argv, const string& title, InputEventHandl
731
731
//
732
732
auto localExitCode = exitCode;
733
733
if (Application::application != nullptr ) {
734
- Console::println (" Application::run(): Shutting down application" );
734
+ Console::printLine (" Application::run(): Shutting down application" );
735
735
Application::application->dispose ();
736
736
Engine::shutdown ();
737
737
Audio::shutdown ();
@@ -875,10 +875,10 @@ void Application::glfwOnClose(GLFWwindow* window) {
875
875
}
876
876
877
877
void Application::glfwOnDrop (GLFWwindow* window, int count, const char ** paths) {
878
- Console::println (" Application::glfwOnDrop(): " + to_string (count) + " items have been dropped" );
878
+ Console::printLine (" Application::glfwOnDrop(): " + to_string (count) + " items have been dropped" );
879
879
vector<string> pathsVector;
880
880
for (auto i = 0 ; i < count; i++) {
881
- Console::println (" \t " + string (paths[i]));
881
+ Console::printLine (" \t " + string (paths[i]));
882
882
pathsVector.push_back (paths[i]);
883
883
}
884
884
Application::application->onDrop (pathsVector);
@@ -889,14 +889,14 @@ void Application::glfwOnJoystickConnect(int joystickIdx, int event) {
889
889
//
890
890
if (event == GLFW_CONNECTED) {
891
891
if (glfwJoystickIsGamepad (joystickIdx) == GLFW_TRUE) {
892
- Console::println (" Application::glfwOnJoystickConnect(): connected gamepad with idx = " + to_string (joystickIdx) + " , name = " + glfwGetJoystickName (joystickIdx));
892
+ Console::printLine (" Application::glfwOnJoystickConnect(): connected gamepad with idx = " + to_string (joystickIdx) + " , name = " + glfwGetJoystickName (joystickIdx));
893
893
Application::application->connectedGamepads .insert (joystickIdx);
894
894
} else {
895
- Console::println (" Application::glfwOnJoystickConnect(): connected joystick with idx = " + to_string (joystickIdx) + " , name = " + glfwGetJoystickName (joystickIdx));
895
+ Console::printLine (" Application::glfwOnJoystickConnect(): connected joystick with idx = " + to_string (joystickIdx) + " , name = " + glfwGetJoystickName (joystickIdx));
896
896
Application::application->connectedJoysticks .insert (joystickIdx);
897
897
}
898
898
} else if (event == GLFW_DISCONNECTED) {
899
- Console::println (" Application::glfwOnJoystickConnect(): disconnected joystick/gamepad with idx = " + to_string (joystickIdx));
899
+ Console::printLine (" Application::glfwOnJoystickConnect(): disconnected joystick/gamepad with idx = " + to_string (joystickIdx));
900
900
Application::application->connectedGamepads .erase (joystickIdx);
901
901
Application::application->connectedJoysticks .erase (joystickIdx);
902
902
}
0 commit comments