summaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 438a5a6903..d33469b6f5 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1350,7 +1350,9 @@ void OS_Windows::finalize() {
memdelete(main_loop);
main_loop=NULL;
-
+
+ memdelete(input);
+
visual_server->finish();
memdelete(visual_server);
#ifdef OPENGL_ENABLED
@@ -1377,8 +1379,6 @@ void OS_Windows::finalize() {
memdelete(audio_server);
memdelete(sample_manager);
- memdelete(input);
-
physics_server->finish();
memdelete(physics_server);
@@ -1768,15 +1768,26 @@ void OS_Windows::print_error(const char* p_function,const char* p_file,int p_lin
HANDLE hCon=GetStdHandle(STD_OUTPUT_HANDLE);
if (!hCon || hCon==INVALID_HANDLE_VALUE) {
- if (p_rationale && p_rationale[0]) {
-
- print("\E[1;31;40mERROR: %s: \E[1;37;40m%s\n",p_function,p_rationale);
- print("\E[0;31;40m At: %s:%i.\E[0;0;37m\n",p_file,p_line);
- } else {
- print("\E[1;31;40mERROR: %s: \E[1;37;40m%s\n",p_function,p_code);
- print("\E[0;31;40m At: %s:%i.\E[0;0;37m\n",p_file,p_line);
+ const char* err_details;
+ if (p_rationale && p_rationale[0])
+ err_details=p_rationale;
+ else
+ err_details=p_code;
+ switch(p_type) {
+ case ERR_ERROR:
+ print("\E[1;31mERROR: %s: \E[0m\E[1m%s\n",p_function,err_details);
+ print("\E[0;31m At: %s:%i.\E[0m\n",p_file,p_line);
+ break;
+ case ERR_WARNING:
+ print("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n",p_function,err_details);
+ print("\E[0;33m At: %s:%i.\E[0m\n",p_file,p_line);
+ break;
+ case ERR_SCRIPT:
+ print("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m",p_function,err_details);
+ print("\E[0;35m At: %s:%i.\E[0m\n",p_file,p_line);
+ break;
}
} else {