Commit Graph

39 Commits

Author SHA1 Message Date
Thunderforge 339d347aea Fixing performance-faster-string-find issues
This addresses the Clang Tidy check [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html).
2021-05-10 22:44:07 -05:00
fredzio 4058e117ca Don't clobber game log file when we collect a stack trace.
When the crash catcher catch a signal it forks to collect data about its
parent. In the process the child reinitialize the log file, which ends
up empty.
2021-04-17 13:14:01 +02:00
AnyOldName3 9466d6a409 Hide macro usage from Macs where it isn't defined 2021-03-14 03:42:23 +00:00
AnyOldName3 5e004356a2 Merge remote-tracking branch 'upstream/master' into alpha-meddling 2020-12-27 02:48:42 +00:00
AnyOldName3 7e045cff75 #include <memory> 2020-12-20 01:51:45 +00:00
AnyOldName3 0e4e8eb0f3 Add glDebugGroup support 2020-12-20 01:22:14 +00:00
CedricMocquillon 112437cf28 Change crash file to dmp on window to avoid renaming it 2020-12-13 14:13:07 +01:00
CedricMocquillon 73afc55462 Fork the current process to monitor exe, generate minidump on crash 2020-12-12 20:17:26 +01:00
Petr Mikheev 49c6e50c31 Print '--version' and '--help' messages without timestamps 2020-12-08 23:14:49 +01:00
Petr Mikheev 5734551ff3 Add time to logs. Redirect OSG log to OpenMW log. 2020-12-05 13:46:02 +01:00
AnyOldName3 89d73c5fc7 Only reroute stdout etc. to new console if not already redirected
This should fix the issue where Windows Release builds (compiled as
/SUBSYSTEM:WINDOWS instead of /SUBSYSTEM:CONSOLE) can't have their
output redirected.

Basically, a console application creates a console if not given one, so
you get a console window behind OpenMW while it's running. It was
decided that this was ugly, so we set Release builds to be windows
applications, which don't get an automatic console and don't
automatically connect to a console if given one anyway.

Of course, we still wanted to actually be able to print to a console if
given one, so we manually attach to the parent process' console if it
exists, then reopen the standard streams connected to CON, the Windows
pseudo-file representing the current console.

This is a little like connecting a second wire into a dumb terminal in
that you're pumping characters into the display rather than onto a
pipeline, so output can't be redirected.

It turns out, though, that if a /SUBSYSTEM:WINDOWS application has its
standard streams redirected by the calling process, it still gets its
handles as normal, so everything starts off connected just how we want
it and we were clobbering this good setup with the straight-to-console
fix.

All we need to do to fix that is check if we've got valid standard
handles and that they go somewhere useful, and if so, avoid reopening
them once the console is attached. Simples.
2020-11-14 02:04:46 +00:00
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
AnyOldName3 390fb4f12e Disable OpenGL Debug stuff when SDL doesn't provide the necessary definitions 2020-09-21 00:49:09 +01:00
AnyOldName3 3f61ff3a44 Make OpenGL debugging optional 2020-09-19 23:30:34 +01:00
AnyOldName3 441c09578a Merge remote-tracking branch 'origin/khr_debug' into khr_debug 2020-09-19 23:09:11 +01:00
Andrei Kortunov 2e7712a390 Fix C5204 warnings by adding default virtual destructors 2020-03-26 14:49:12 +04:00
elsid 29f262e514
Fix crash on destructed stream usage 2019-09-28 11:30:38 +02:00
Andrei Kortunov 14b756a692 Use a generic logging system for RecastNavigation 2019-04-08 20:31:21 +04:00
AnyOldName3 6de1deeb2d Include gldebug attribution and licence 2019-02-28 00:02:07 +00:00
AnyOldName3 e147f6fed9 Finsih gldebug move completely this time 2019-02-28 00:02:07 +00:00
AnyOldName3 ac18983f37 Finish gldebug location move 2019-02-28 00:02:07 +00:00
AnyOldName3 d42c976852 Add detailed OpenGL debug messages 2019-02-28 00:02:07 +00:00
AnyOldName3 aaa3eedf99 Move gldebug from components/misc to components/debug 2019-02-28 00:02:07 +00:00
Stanislaw Halik c5c160870d fix accidental header namespace inclusion 2018-12-12 00:48:27 +01:00
Stanislaw Halik f6c8842457 move to debugging.[ch]pp 2018-12-12 00:41:53 +01:00
Stanislaw Halik 74955555b9 remove verbose comments and example 2018-12-12 00:02:09 +01:00
Stanislaw Halik 56d79bd4e0 fix typo 2018-12-08 20:58:10 +01:00
Stanislaw Halik 44e60b708b fix missing _WIN32 guard 2018-12-08 03:13:18 +01:00
Stanislaw Halik 64e960aa22 enable win32 debug console when launching from console 2018-12-08 01:29:14 +01:00
AnyOldName3 a6d3210a9c Include missing Windows header before calling Windows-specific functions 2018-11-02 01:05:39 +00:00
AnyOldName3 90986df81c Allow OSG objects to be sent to the debug log. 2018-10-30 22:15:32 +00:00
Andrei Kortunov b5df385111 Allow apps without logging system to display log messages 2018-10-14 12:07:15 +04:00
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Andrei Kortunov e5a81b1f99 Fix some issues, found by Coverity Scan 2018-09-10 16:35:27 +04:00
Andrei Kortunov 5693ceca74 Remove redundant declaration 2018-09-04 17:56:19 +04:00
Andrei Kortunov 1452684d9e Use new logging system for components 2018-08-14 19:42:41 +04:00
Andrei Kortunov 9a5b016293 Move crashcatcher initialization to components 2018-08-14 11:17:05 +04:00
Andrei Kortunov 5e172ed831 Move cerr initialization out of 'try' block 2018-08-14 10:30:27 +04:00
Andrei Kortunov 7d6e3673e0 Implement advanced logging system (feature #4581) 2018-08-12 13:38:15 +04:00