Commit Graph

115 Commits (06bf80cc3b6e9ebd4907f192b30a54766f334b98)

Author SHA1 Message Date
AnyOldName3 95a1183ad3 Fix OpenGL debug groups 3 months ago
elsid 6a67263d6b
Separate the log level and the flag for writing the log level 6 months ago
elsid 98a8dcbdbf
Limit log buffer size 6 months ago
elsid c83acac32c
Add a function to get debug level 6 months ago
elsid 0749cc4dac
Remove unused include 6 months ago
elsid 1bdc01273e
Move "debugging" function into Debug namespace 6 months ago
elsid ea84d1ce0c
Remove unused mode argument 6 months ago
elsid 89bb04e8fd
Exit with fatal error on duplicated instruction code
Instead of causing SIGABRT which is more confusing.
6 months ago
elsid 38f0533bcf
Write to log file records captured before configs are loaded 8 months ago
elsid 4ab5871dc4
Split Tee logic into different types 8 months ago
AnyOldName3 83e3718bed . c l a n g - f o r m a t 9 months ago
AnyOldName3 61364c874f Warn future me off wasting their time again 9 months ago
AnyOldName3 a7021bf9cc Clear std stream errors when reopening
Prior errors are no longer relevant.

Shouldn't make a difference unless you've tried printing something before the streams were set up.
9 months ago
AnyOldName3 1930bfeabb Support coloured terminal output on Windows
First try the modern Windowsy way, where we can directly query if escape sequences will be processed.
The function is available as far back as Windows 2000, but it just won't return the right flag until the Windows version is new enough.

If that fails, fall back to the Unixy way, as not all colour-supporting terminal emulators for Windows use the Win32 API to declare that capability.
The implementation isn't identical as isatty wasn't available without adding more headers, and we already have Windows.h in this file, so I might as well use the Win32 API instead of its POSIX-compatibility layer.
9 months ago
AnyOldName3 9638fbabb4 https://www.youtube.com/watch?v=2_6U9gkQeqY 10 months ago
AnyOldName3 ff3ffa13b6 Auto format 10 months ago
AnyOldName3 28131fd62b Fixes for a whole bunch of warnings
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882.
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.

Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.

Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.

There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.

We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
10 months ago
Andrei Kortunov fc1f244627 Add missing initialization 10 months ago
Alexei Kotov d9ee54ae98 DebugCustomDraw: Correct PerContextProgram use, clean up drawImplementation 11 months ago
Alexei Kotov 4df62d53db Fix OSG boilerplate macro for DebugCustomDraw 11 months ago
Alexei Kotov 6a96cdaa31 Make DebugDrawer a Node 11 months ago
Alexei Kotov 9531b6983a Don't reallocate debug line primitives 11 months ago
Alexei Kotov f9498e6ea4 Make DebugDrawer a LightManager child, don't use VAO for lines
Fixes terrain lighting but currently breaks non-line primitive rendering in exteriors
11 months ago
Alexei Kotov 38ab09a52e Try to uncursify DebugDrawer scene representation 11 months ago
elsid 55501a02c0
Define only one crashCatcherInstall function 11 months ago
AnyOldName3 2ed584428c Add missing headers to components/CMakeLists.txt
Otherwise, they won't show up as part of the project in IDEs.
1 year ago
psi29a c86eecb2ea Merge branch 'movable_objects' into 'master'
Move objects instead of copying where possible

See merge request OpenMW/openmw!3289
1 year ago
Andrei Kortunov 35561450f1 Do not copy osg::ref_ptr when possible 1 year ago
elsid 798f3cc385
Support ESM4 record FullName, CellFlags, X, Y fields by esmtool 1 year ago
AnyOldName3 1bdcb5d6d9 Share the dump directory for crash and freeze dumps
This means the shared memory struct is just 255 bytes longer than a few
commits ago instead of 32K.

Also introduce a function for putting path strings in the shared memory
as there was too much copied and pasted code and it was error-prone.

Also free some handles once we're done with them so they don't leak.
1 year ago
AnyOldName3 48368f79b6 Update Windows crash dump path once we know where we're logging
Manual rewrite of 5102f4b11d
2 years ago
AnyOldName3 72d99237e3 This would never have happened had clang format not tried making this function wrogn in the first place 2 years ago
AnyOldName3 1bcbc4f53f Undo clang format change because clang format in CI disagrees with clang format on my computer 2 years ago
AnyOldName3 3bb3f58c73 Don't put crash dumps in Temp on Windows
Well... unless we fail to get the user profile directory.

Also put freeze dumps in a more appropriately-named file.

Discussed in https://gitlab.com/OpenMW/openmw/-/issues/7455

Manual rewrite of c21695c951

As well as that, I found a bug where the crash dump path was being converted from a std::filesystem::path to a utf8-encoded std::string, then passed to the crash catcher, which converted it to a std::filesystem::path implicitly, but using the system eight-bit code page, which wouldn't usually be UTF-8. That's now fixed by passing the function that expects a path a path instead of a string.
2 years ago
Shi Han a90e3b8c3b Move from std::atoi to std::from_char 2 years ago
Cody Glassman ac4787aeec shade refactor 2 years ago
elsid 627bed09ee
Remove redundant operator<< overloads from Log 2 years ago
Andrei Kortunov 8925f854e7 Fix non-ASCII path logging 2 years ago
elsid c44bc5ade5
Setup logging with properly initialized configuration manager
Default constructed instance may provide different paths from initialized one.
2 years ago
elsid 007ad4e4d1
Write crash log to temporary directory
To make sure current user has rights to do so.
2 years ago
AnyOldName3 77de37b1ed Revert "Merge branch 'fix_macos_build' into 'master'"
As well as fixing the MacOS build, it meddled with a bunch of files that
already did the right thing.

This reverts commit 8162541a14, reversing
changes made to e16c451d08.
2 years ago
elsid c324482338
Use separate header to define missing GL constants 2 years ago
elsid 063fff7fa4
Fix and prevent -Wextra-semi warning 2 years ago
clang-format-bot 88ec8a9523
Apply clang-format 2 years ago
Project579 5cf2a958eb Make conversions between std::chrono time_point and string safer by not using "localtime" directly. 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
florent.teppe 943198e325 Small changes 2 years ago
florent.teppe e811f7ed00 Simplified the data structures.
DebugCustomDraw owns the vector of drawcalls and the line geometry.
There are two DebugCustomDraw, so anything they own is double buffered.
Because DebugDrawer has a ref_ptr on the DebugCustomDraw, they live at least as long as DebugDrawer, making memory access from it safe.

removed redundent this
2 years ago
florent.teppe 565a08b95a crashfix on game exit 2 years ago
elsid 9f35f9b45b
Add missing include <array> 2 years ago