From top to bottom,
- Fix incorrect gcc implementation in `SetThreadName`
- Static Cast in `StartThread`
- Fix `MutexImpl_Win32::Lock()`
- Remove unnecessary pre-winXP methods in PortableSignalObjectAndWait()
- Static Cast in `EventImpl_Win32::Wait`
These functions are based on "DecodePacket" and "ReadPacket". This
PR does not consume the new buffer or decoding functions yet. It also
preps the class for adding a fast cancel to decoding, in the case that
the movie texture is destroyed while decoding is still happening.
The old implementation relied on the tricks that no longer seem to
optimize anything and break strict aliasing rule, which in turn is an
undefined behavior:
/var/storage/rf/proj/itgmania/src/RageTypes.h: In function ‘unsigned char FTOC(float)’:
/var/storage/rf/proj/itgmania/src/RageTypes.h:300:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
300 | int ret = reinterpret_cast<int&>(base);
| ^~~~
Compiler explorer summary: https://godbolt.org/z/5857747P3
It's also possible to eliminate this strict aliasing violation with a union,
while leaving all the tricky code (also included in the link above).
Online build of the test code that's suggested for FTOC: https://onlinegdb.com/O7N0Orl0r
ARM version of the code wasn't correct -- as in not passing the attached test.
It didn't perform accurately around the end of the input range.
This commit properly returns you to the correct pack when leaving a folder or returning from another screen.
This is achieved by returning you to your last open section. Previously behavior searched for the first instance of the song in your sort and put you in that section.
Encapsulate actor resize functionality.
Significant performance improvement on the `UpdateAnimationState` function which was bottlenecking many operations.
See ITGmania PR #253 for more information.
1) Set a buffer of 2MB instead of setting the buffer to nullptr and depend on it being grown by assets being loaded at the game launch
2) Update some C style code to C++ style
3) Improve Extend feature to support handling a larger number of samples, and error handling in case of a memory allocation failure
Dynamic linking against libbz2 was problematic on some distributions.
We only needed it for pcre's CLI (which we don't use) and ffmpeg's mkv
decompression in case a user forced encoder to use it, because its usage
is discouraged by the standard.
See https://github.com/itgmania/itgmania/issues/217 for the related
discussion.
When any scaling other than 100% is set for a display, Windows will
automatically scale any DPI unaware applications. This leads to ITGmania being
unusable in fullscreen mode, as parts of the screen are cut off. Add a DPI
aware indication to the manifest to prevent this from happening. Note that
ITGmania won't actually adjust its rendering to the new DPI, it will just
prevent the automatic scaling.
Since the ShowMouseCursor preference exists we don't want to force hiding the mouse cursor when full screened. Instead let the user/theme decide with ShowMouseCursor.