Commit Graph

32 Commits

Author SHA1 Message Date
sukibaby 744bfe7800 Global function CallEveryNFrames
Call a function every `n` frames.
2025-04-23 09:29:29 -07:00
Brandon W 9789ef9697 Give actors the ability to undo the rate change triggered by holding
tilde or tab.

This is gated by a new boolean, `tab_tilde_scaling_enabled_`, and
applied only to banners by default.
2025-03-02 10:34:28 -08:00
sukibaby 584fca49b7 Remove low_sample_count_workaround
No longer needed now that hardware clamping methods are corrected.
2024-10-01 13:03:06 -07:00
sukibaby abf89ec2b1 Replace SAFE_DELETE / SAFE_DELETE_ARRAY macros
SAFE_DELETE -> RageUtil::SafeDelete
SAFE_DELETE_ARRAY -> RageUtil::SafeDeleteArray

Update JsonUtil.h to include RageUtil.h - MSVC doesn't need it included for some reason, but GCC and XCode does.
2024-09-30 15:13:32 -07:00
sukibaby 803dc1309a Optimize avoiding CheckGameLoopTimerSkips
Implements a static boolean to track the CheckGameLoopTimerSkips preference, so that it isn't calling PREFSMAN via CheckGameLoopTimerSkips in a tight loop. Since this setting is rarely used, and isn't expected to be changed while the game is open, it doesn't need to be continuously checked.
2024-09-06 11:31:46 -07:00
sukibaby b698eb5f0c Simplify the input device check
Reduce the input device check from every 500 frames to every 255 frames by way of replacing the modulo 500 with a wrapping uint8_t. A bit faster reaction during device plug-in is nice, and using a simple pre-increment instead of doing a modulo is a little more efficient.
2024-09-06 11:31:46 -07:00
sukibaby beecd2bd47 Clean up messy GameLoop function 2024-08-06 18:07:21 -07:00
sukibaby 8f5b45f2ca Revert some thread priority level changes 2024-07-10 11:57:37 -07:00
sukibaby 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
sukibaby fcb7989a98 Encapsulate input device check to run it less often 2024-06-08 18:10:05 -07:00
sukibaby 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
sukibaby 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
sukibaby 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
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +02:00
Martin Natano b68ca517e6 Clean up math functions
- Remove checking for standard functions from the build system
- Prefix all invocations with std::
- Replace suffixed functions with unprefixed versions
- Include <cmath> in all files that use it and remove the global include

e.g. floorf(x) -> std::floor(x)
2023-04-19 19:31:40 +02:00
Michael Sundqvist 0cba3579de Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements
Fix whitespace changes
2022-07-31 22:14:38 +02:00
Martin Natano 4c0aef69dd Remove legacy network code 2022-04-11 14:50:00 -07:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Chris Pable c200600c65 Fix audio drivers with a low sample count maximum value (#1697) 2018-08-02 08:28:24 -07:00
Kyzentun Keeslala b34f07e10f Check whether InitialScreen is valid before using it after changing themes. 2016-02-13 10:11:22 -07:00
Kyzentun f632806f89 Reload Scripts when changing game types. 2014-12-25 18:37:51 -07:00
Kyzentun 01442d193f Fixed SwitchThemeAndLanguage to run lua scripts when reloading the theme. Removed ForceThemeReload param from GameLoop::ChangeTheme. 2014-08-24 03:21:01 -06:00
Kyzentun c3fb210291 Created GameLoop::ChangeGame analogous to GameLoop::ChangeTheme. Changed ChangeTheme to use the AfterThemeChangeScreen metric instead of a passed in screen name from the theme being changed away from. ChangeGame uses the AfterGameChangeScreen and AfterGameAndThemeChangeScreen metrics to pick the screen to load after the change. New metrics are optional and default to InitialScreen. Changed ScreenManager::ThemeChanged to not duplicate the code in ReloadOverlayScreens. Fixed ScreenManager::IsScreenNameValid to check with HasMetric before using GetMetric. Changed game ConfOption logic to set the preference and work in a similar way to the theme ConfOption. Added THEME:SetTheme lua function. 2014-07-20 20:59:12 -06:00
Kyzentun 0f72d7cc6b Changed NoteSkinManager to use new error reporting and avoid crashing. Fixed DoChangeTheme to switch to the InitialScreen if the screen doesn't exist in the theme being changed to. Fixed error reporting in MeterDisplay. 2014-07-15 13:28:06 -06:00
Jason Felds 28e5148dec The big NULL replacement party part 5.
Right. ' = NULL' would get a lot of these.
2013-05-03 23:39:52 -04:00
Jason Felds ba59dd1656 The big NULL replacement party part 2.
This may take a bit. Trying to do this by operator/command.
2013-05-03 23:11:42 -04:00
Jason Felds 9f24627bf9 The big NULL replacement party part 1.
This is meant to be a safer alternative since
NULL can often be 0. Let's not rely on that.

And yes, I know this is a lot of files. This is
a safer thing to do in big commits vs for loops.
2013-05-03 23:01:54 -04:00
Jason Felds 3d52695085 Simple one to fix here. 2013-04-30 23:14:10 -04:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
AJ Kelly 53a8a435ef remove unfinished karaoke mode 2010-08-19 21:24:35 -05:00
AJ Kelly 3e51544930 Initial commit. 2010-01-26 21:00:30 -06:00
Devin J. Pohly 80057f53cd smsvn -> ssc-hg glue: rearrange directory structure 2013-06-10 15:38:43 -04:00