Commit Graph
36520 Commits
Author SHA1 Message Date
sukibabyandteejusb 264244d6a3 Copy & swap assignment operator 2024-07-10 11:28:43 -07:00
sukibabyandteejusb dd4f92d289 Remove COMPARE macro from TimingData.h 2024-07-10 10:45:48 -07:00
Crash Cringleandteejusb bc65d16c4a Move LastOpenSection declaration outside of if/else, add clarity to comment 2024-07-07 16:14:07 -07:00
Crash Cringleandteejusb 667d27b361 Fix Level and Preferred Sorts to account for a song being in multiple sections
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.
2024-07-07 16:14:07 -07:00
sukibabyandteejusb 0447d9ae58 Consistency in Windows ifdefs/windows.h includes
Changing all defined(_WINDOWS) to defined(_WIN32)

Defining WIN32_LEAN_AND_MEAN in all files except those in Archutils/Win32
2024-06-24 15:48:05 -07:00
sukibabyandteejusb 65fe06bcd3 Prevent need for fallthrough attribute 2024-06-23 21:40:09 -07:00
sukibabyandteejusb 5e3bc389c3 Fix uninitialized variable in Crash.cpp 2024-06-23 21:39:40 -07:00
teejusb 5d4f9dcb07 Update SImply Love to 5.5.0 2024-06-18 19:09:56 -04:00
teejusb cf7bf6fdb1 Version bump to 0.9.0 2024-06-18 16:32:36 -04:00
Scott Brennerandteejusb 17524f22e8 Bump macos-build-x86_64 runner 2024-06-18 13:24:02 -07:00
teejusb f0c249c03c Static cast int to size_t 2024-06-18 16:09:24 -04:00
sukibabyandteejusb ae6d7cecb5 Update ActorMultiVertex.cpp
Encapsulate actor resize functionality.

Significant performance improvement on the `UpdateAnimationState` function which was bottlenecking many operations.

See ITGmania PR #253 for more information.
2024-06-18 06:37:44 -07:00
sukibabyandteejusb 9e3c7fc207 Update RageSoundMixBuffer
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
2024-06-18 06:27:56 -07:00
Rafał Florczakandteejusb 90aabddc7f Drop libbz2 dependency
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.
2024-06-18 05:39:51 -07:00
phantom10111andteejusb daad1a2333 Windows: Mark executable as DPI aware
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.
2024-06-17 22:45:48 -07:00
sukibabyandteejusb 5b0070f403 Win32 thread priority isolation layer
other changes merged in this commit:
Update RageSoundReader_ThreadedBuffer.h
Update GameLoop.cpp
Update CMakeData-os.cmake
2024-06-11 06:32:27 -07:00
hayoreoandteejusb 481532ab77 Don't necessarily hide the mouse cursor when full screened.
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.
2024-06-11 05:49:41 -07:00
sukibabyandteejusb 47ff2cf095 Prevent setting the position of a nullptr
Also implemented copy just in case
2024-06-09 21:07:49 -07:00
sukibabyandteejusb 339aafcd65 Remove bad line from fallback language files 2024-06-09 21:06:49 -07:00
sukibabyandteejusb 471a92e322 Improve error logging in IniFile.cpp 2024-06-08 20:31:31 -07:00
sukibabyandteejusb fcb7989a98 Encapsulate input device check to run it less often 2024-06-08 18:10:05 -07:00
sukibabyandteejusb cb1e2843de Minor RageSound improvements
Nothing major here - updating C style casts, moving repeated function calls into variables, changing lrint's...

**RageSound.cpp**

- Initialize m_pSource to nullptr in the member initializer list, rather than in the body of the constructor
- Define an undefined variable `iSourceFrame`
- Change a `lrint` to a `static_cast<int>+0.5`
- Implement missing error handling in `SetStopModeFromString` with a log message

**RageSoundManager**

- Combined the iterator increment and the erase operation for `Update` into one line to prevent needing to create the `next` variable, since GameLoop calls this method frequently

**RageSoundReader**

- This method is called from RageSound just after making sure iFrames isn't equal to 0, so it's not needed for RageSoundReader to do it again.
- We will never fail to read a file 100 times. If we do, it's because of I/O errors, so make that more clear.
2024-06-08 17:15:04 -07:00
sukibabyandteejusb 48c1fe3856 Revert "Windows: Compile with /utf-8 flag"
This reverts commit 58a45d91f4.
2024-06-08 16:20:04 -07:00
sukibabyandteejusb 829f49f622 Fix NotesLoaderDWI.cpp
This resolves the following issues with DWI format simfiles:

- DWI files containing valid charts may fail to load and appear to have 0 or 1 notes
- DWI files opened in the editor would not save the original contents of the chart into a new file
2024-06-08 16:18:01 -07:00
sukibabyandteejusb 12ceb7fc7c Clean up DoChangeTheme()
I moved the logic for getting the new screen name into a separate function GetNewScreenName(), for the sake of containing the logic for getting the new screen name in one place.

I tried some different optimizations for GetNewScreenName(), however none of them were much of a performance savings over the original code, if any, when viewed in a disassembler, so I ultimately chose to keep the original code.
2024-06-08 15:59:48 -07:00
sukibabyandteejusb de351c7228 Don't change priority if game loses focus
This is what really causes problems when alt-tabbing in and out of the game, with OBS, etc. 

ITGmania uses less than 5% CPU usage on my 10 year old CPU. I can leave ITGmania running in the background with assist tick going and no notes are getting lost or stuttering.

It's not really worth shifting all the threads to a lower priority in the name of saving resources, considering how few resources the game consumes.
2024-06-08 15:36:18 -07:00
teejusb ee18ecfff3 Downgrade from MbedTLS 3.6.0 -> 3.5.2 because of connectivity issues 2024-06-08 15:12:08 -07:00
teejusb c475e86f81 Update IXWebSockets which removes reliance on the compile time flag 2024-06-07 22:11:17 -04:00
Rafał Florczakandteejusb 903fa7eea3 Treat type-limits as errors in GNU builds 2024-05-30 17:38:47 -07:00
Rafał Florczakandteejusb f7f88f9544 Guard against signedness of chars and wchars on different targets 2024-05-30 17:38:47 -07:00
Gareth Francisandteejusb 60c3dcd3d7 Add WITH_MINIMAID option to allow building on ARM 2024-05-30 17:38:47 -07:00
sukibabyandteejusb c2ac89dcb6 Improve calc_mean function
A problem with using std::accumulate to calculate the mean is that small numbers get rounded down to zero when dealing with floating point numbers. This is solved by implementing the Kahan summation algorithm (https://en.wikipedia.org/wiki/Kahan_summation_algorithm).
2024-05-30 17:36:55 -07:00
sukibabyandteejusb 6f86f3eae5 Restore comment in Actor.cpp 2024-05-29 10:30:49 -07:00
sukibabyandteejusb e5d7b0db6c Update FFmpeg URL in .gitmodules 2024-05-29 10:30:30 -07:00
sukibabyandteejusb 03033857c2 Actor optimizations 2024-05-28 10:24:23 -07:00
sukibabyandteejusb 626e127589 Replace src/archutils/Win32/ddk/hidpi.h
From SDK 10.0.16299
2024-05-28 10:19:50 -07:00
sukibabyandteejusb b730a5a750 Remove AltiVec code
The content of src/archutils/Darwin/VectorHelper.cpp is very old, these are AltiVec and SSE2 instructions. This is only actually used in RageSoundMixBuffer.cpp. This level of micro-optimization is not needed since platforms this old are not supported by ITGm.
2024-05-28 09:34:59 -07:00
sukibabyandteejusb 558d84c37f Remove NTPAD check
NTpad is a driver for Windows 2000/XP which enables the use of a controller via the parallel port. This is not needed anymore and is just causing lag by constantly scanning the list of input devices on Windows.
2024-05-28 09:14:13 -07:00
Pete-Lawrenceandteejusb b2d69659eb Added missing lifts to stock dance Noteskins 2024-05-14 13:08:02 -07:00
sukibabyandteejusb b6f0da79a4 Change a lrint 2024-05-14 09:35:38 -07:00
sukibabyandteejusb 705a069400 Resolve the SM5 sync drift issue
Summary of changes

1) Fix issues in RageTimer and RageSoundPosMap
2) Calculate seconds from microseconds more accurately
3) Replace lrint(x) with static_cast<int>(x+0.5) for better performance
4) Replace C style casting with C++ style casting
5) Make important values 64-bit wide
6) Update RageUtil.cpp (timer conversion RStrings had some math which needed to be fixed after fixing RageTimer's math)
7) Ensure floating point math is done as floating point
8) Improve code commentary all around
9) Improve clarity and efficiency of RageSoundPosMap "return closest position" error logging
2024-05-12 08:05:41 -07:00
phantom10111andteejusb b365dcd65d PulseAudio: Hold mainloop lock during GetPosition() call
Mainloop lock needs to be held to access PulseAudio object from outside the
event loop thread, in particular in GetPosition() calls. Otherwise we might hit
a race condition and have the call fail. There's also a possibility that the
call might randomly fail if it's called before first timing data is received
for the stream, so handle that case as well.

Also fix the stream write callback to call Mix() with correct parameters, as
well as do the work in a loop in case pa_stream_begin_write() returns smaller
memory buffer than was requested.
2024-05-11 10:26:50 -07:00
phantom10111andteejusb bbf556450d X11: Don't call any X11 functions on fatal error
If X11 functions are called after a fatal error then it just triggers the fatal
error handler again eventually leading to stack overflow.
2024-05-11 09:46:26 -07:00
sukibabyandteejusb 3f8a7f5fd3 Run as "High Priority" on Windows
Enforcing HIGH_PRIORITY_CLASS is best for Win10+ where Windows Update can interrupt the game and it also prevents streaming apps (OBS/Discord) from causing stutter by taking rendering priority away from ITGMania.

Update ArchHooks_Win32.cpp
2024-05-10 00:33:36 -07:00
sukibabyandteejusb 3d63d80163 Always use CLOCK_MONOTONIC if it's available on Unix 2024-05-08 10:37:17 -07:00
sukibabyandteejusb eb8b428d0f Use range-based for loops in ScreenManager.cpp
Modernizing some of the old code - improve reliability by replacing traditional iterator loops where they are not needed.

Update ScreenManager.cpp
2024-05-08 01:55:51 -07:00
sukibabyandteejusb f7a7252dbb Replace timeGetTime() with QueryPerformanceCounter()
Update ArchHooks_Win32Static.cpp

This code provided a 7x accuracy improvement over timeGetTime(). (0.2ms vs 1.4ms std dev*3)

Rename variables to fit with existing naming mechanism
2024-05-07 17:57:47 -07:00
sukibabyandteejusb 8d24f61214 Don't warn user if frame size is not a multiple of 2
Disable this common nag warning + log file warning combination.
2024-05-07 10:20:12 -07:00
sukibabyandteejusb a5bbcebd0c Update BPMDisplay.cpp
Update BPMDisplay.cpp

Replace lrint with static_cast<int>+0.5

Proposed lrint change for the same reason as #235.
2024-05-04 10:52:43 -07:00
sukibabyandteejusb 2e2d49393b Replace lrint(x) with static_cast(x+0.5)
Update 9 files

Update RageSoundReader_Extend.cpp
Update RageSoundReader_Preload.cpp
Update RageSoundUtil.cpp
Update RageSoundReader_ThreadedBuffer.cpp
Update RageSoundReader_SpeedChange.cpp
Update RageSoundReader_Resample_Good.cpp
Update RageSoundReader_Merge.cpp
Update RageSoundReader_Chain.cpp
Update RageSoundMixBuffer.cpp
2024-05-03 23:17:59 -07:00