Commit Graph

82 Commits

Author SHA1 Message Date
teejusb 53dcbed80d Revert "Change some RString methods to free functions" 2025-06-22 23:31:56 -07:00
Patrik Nilsson 8f13335c72 Add 180hz refresh rate
Add 180hz refresh rate
2025-06-04 08:17:54 -07:00
Patrik Nilsson 2e18b57da0 Implement configurable Sample Rate in options
Key changes:
- Added "Sample Rate" to `ScreenOptionsGraphicsSound` with choices:
    - "Default" (resolves to 44100 Hz for now)
    - "44100 Hz"
    - "48000 Hz"
- Created a new ConfOption "PreferredSampleRate" in `ScreenOptionsMasterPrefs.cpp` mapping UI choices to the integer values (0, 44100, 48000) for the existing `m_iSoundPreferredSampleRate` preference.
- Updated relevant sound drivers:
    - DirectSound (RageSoundDriver_DSound_Software): Primary buffer now attempts to use the preferred rate. Secondary buffers already handled it correctly.
    - WaveOut (RageSoundDriver_WaveOut): Already handled 0 as 44.1kHz correctly.
    - PulseAudio (RageSoundDriver_PulseAudio): Ensured m_InitStream uses the constructor-initialized rate based on preference.
    - AudioUnit (RageSoundDriver_AU): Already handled 0 as 44.1kHz and attempts to set hardware rate.
    - OSS (RageSoundDriver_OSS): Updated to read and apply the preferred sample rate.
    - WDMKS (RageSoundDriver_WDMKS): Updated to pass the resolved preferred rate to its stream opening logic.
    - Null (RageSoundDriver_Null): Already handled 0 as 44.1kHz correctly.
- Updated `RageSoundReader_Chain` constructor to use the preferred system sample rate for its internal default.
- Added English localization for the new option title and explanation.

The implementation ensures that if the preference is 0 (Default), the system currently defaults to 44100 Hz across all drivers. This lays the groundwork for future dynamic hardware rate detection. A game restart is recommended for the new sample rate to take full effect.
2025-06-01 08:37:19 -07:00
Arthur Eubanks 995f0ea8c1 Change some RString methods to free functions
These ones aren't a std::string method. Doing this helps the RString to
std::string migration.
2025-05-17 14:02:12 -07:00
Arthur Eubanks ecfcb11a00 Remove implicit conversion operator from RString to const char*
This is required for the RString to std::string migration.

Mostly automated from https://github.com/aeubanks/rewriter/blob/main/c_str.cc, with some manual intervention required for fixing up `a + b.c_str()` to `(a + b).c_str()`.

Added some overloads for some common global functions like sm_crash to reduce the number of changes required here.
2025-05-15 21:14:54 -07:00
dando92 2dc61769fc Added logic to reset coins at startup 2025-03-30 09:51:47 -07:00
Crash Cringle 4f0febb57c Rename DefaultSyncBias --> DefaultSyncOffset 2025-03-18 07:28:50 -07:00
Crash Cringle 6b50f9a90c Rename MachineSyncBias --> DefaultSyncBias 2025-03-16 15:42:41 -07:00
Crash Cringle 9529bfd142 Change MachineSyncBias prefs to an enum SyncBias, Changing this song triggers a reload of songs, added new option effect for reloading songs 2025-03-16 15:42:41 -07:00
Crash Cringle dbbcc57112 Explicitly require and use capital NULL and ITG everywhere for sync bias, comment fix, nullptr check for group 2025-03-03 23:25:32 -08:00
Crash Cringle 9d61cb4c06 Okay we use -9ms here because this counters the +9ms folks add to their charts. Ensure we clear the series map when freeing songs 2025-03-03 23:25:32 -08:00
Crash Cringle 437f72b13d Update src/ScreenOptionsMasterPrefs.cpp
Co-authored-by: sukibaby <163092272+sukibaby@users.noreply.github.com>
2025-03-03 23:25:32 -08:00
Crash Cringle 05cd7ed922 reimplement "SyncBias" as something that tells us the sync of the pack so we may adjust accordingly rather than the blanket sync to apply to the pack. 2025-03-03 23:25:32 -08:00
Crash Cringle 00342feadc Add new preference: DefaultGroupOffsetSeconds to dictate the default sync bias on the machine when no group.ini is present (or if there is no SyncOffset field in said file).
- Generally Supports either ITG (9ms) or NULL (0ms).
- Alternatively, one could edit the preference manually to put a different value
- Name/Description probably worth ironing out
2025-03-03 23:25:32 -08:00
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +02:00
Crash Cringle f60c1c7f82 Add new Sorting Capabilities for Profile list 2023-03-13 19:56:07 -07:00
Brian Phlipot 4a6b1a743c Enable more compiler warnings and treat them as errors. 2023-02-02 11:54:17 -08:00
Lamar Cooley f62938787a Add new Preference, Maximum Number of Credits
Grant users the ability to change the maximum amount of credits available rather than the constant cap at 20.

(cherry picked from commit 2ec2355d7a7d9fec9410cf6b7d2b5c31a4406074)
(cherry picked from commit 48245ab51600ede16096e70e27c94345918eaed7)
2023-01-24 13:04:27 -08: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
teejusb 66f0644c15 Add RateModPreservesPitch option to _fallback/engine 2022-06-06 11:21:28 +02:00
Martin Natano 0861ed45c7 Merge /AdditionalSongs into /Songs, and /AdditionalCourses into /Courses
Includes a backwards-compatibility mechanism to adapt paths when loading
Stats.xml.
2022-03-11 22:35:31 +01:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Drew Barbarello 557be7cf1b 5 1 new backport x11 fs rework (#1485)
* Use XRandR 1.2 to set fullscreen resolution for single output

Squash of roothorick's PR #497
(also includes Kyzentun's CMake changes from PR #716)

* Cherry-pick json c++1x stuff (b9e3d7174e)

* Cherry-pick c++11 support from 5bba5c0038 and 9f8b045309

* rework Linux (X11) fullscreen, improve display-related Graphics Options

Implement option to select between monitors for exclusive fullscreen mode
on X11 (using XRandR 1.2), or use a fullscreen borderless window.

Reimplement resolution/refresh rate/display mode-related option rows
using Lua, update choices dynamically so only known-good groupings of
resolution/refresh rate/aspect ratio can be selected.

Minimally update Windows/MacOS LowLevelWindow implementations to support
changes made for Linux side. Fullscreen Borderless Window/multi monitor
support from X11 not implemented for those in this commit.

* allow forcibly disabling xinerama use on Linux

When libXinerama is available, SM tries to use it to find the proper
monitor indexes to use to set _NET_WM_FULLSCREEN_MONITORS (on borderless
fullscreen). xfwm4 seems to assume that monitors are numbered in increasing
order from left to right (rather than using the Xinerama-assigned numbers),
so _NET_WM_FULLSCREEN_MONITORS misbehaves on Xfce.

This commit bypasses use of libXinerama, and instead forces SM to induce fullscreen
on the desired monitor in the backup, hacky way: remove all window hints, move window
to desired monitor, then add _NET_WM_STATE_FULLSCREEN hint. This works on
mutter and Xfce.

* Remove multiple warnings on redundant define.

This used to be hard-coded due to pthread related items, but now it's dynamically determined.

* fix _fallback menu behavior for unrecognized aspect ratios

* Fix error recreating existing FS texture

* Bump deployment target to 10.7 to use libc++ on XCode 8

* Add explicit casts to please clang

* Update changelog
2017-06-18 08:55:16 -07:00
Tyler Brekke 9b5746f505 PercentageDisplay: Fix ShowDancePointsNotPercentage() (#1474)
Remove legacy setting DancePointsForOni

Fixes: #1473
2017-06-07 06:20:48 -07:00
Kyzentun 2aee27a276 Backport custom song support. Prefs are CustomSongsEnable, CustomSongsMaxCount, CustomSongsLoadTimeout, CustomSongsMaxSeconds, CustomSongsMaxMegabytes. Metrics are NumProfileSongGroupColors and the colors with it. Profile custom load function is passed PlayerNumber now. Stepmania must run as root to save USB profile scores. (#1470) 2017-06-06 05:30:06 -07:00
Kyzentun Keeslala 7bd64c32af Added AllowHoldForOptions preference.
Back button now only backs out of a screen on a press.
Updated changelog.
2016-06-24 16:55:01 -06:00
sillybear f7cfa2ac91 [ScreenOptionsMasterPrefs] Added new item in NumBackgrounds 2016-05-18 05:37:22 +08:00
Kyzentun Keeslala 0da27cad75 Make the DisplayResolution option row deal with caching the resolution list, so it only happens on screens that use it. 2016-01-14 16:48:52 -07:00
Kyzentun Keeslala 79f4037088 Changed GetDisplayResolutions on Windows to ignore modes with less than 32bpp and not test modes that have already been tested. Changed ScreenOptionsMasterPrefs to cache the resolutions list once when the screen starts instead of fetching it multiple times. 2016-01-14 16:33:19 -07:00
Kyzentun Keeslala da2db95365 Changed NotesLoaderBMS to not crash when trying to set StepsTypeStr for an unrecognized StepsType. Removed ConfOption for ShowSelectGroup from ScreenOptionsMasterPrefs because the preference does not exist. 2015-10-23 20:42:49 -06:00
Jason Felds d9a3c9cf97 Use cmake to determine which string func we need.
On a side note, better to default to linux names when possible.
2015-10-07 19:00:16 -04:00
Fighter19 73ee19b7cf Adds option for an Axis Fix for some (PS2) adapters which map the D-Pad to Axis 2015-05-06 10:04:55 +02:00
Kyzentun 9314555e6d Added preference for showing multiple toasties in one song. Added IsWaiting to Transition. 2015-04-18 08:52:57 -06:00
Colin Wallace 473974e52f Add ability to delete songs from disk at the song selection screen (Ctrl+Backspace) 2015-03-27 05:22:55 +00:00
Kyzentun 9353840583 Added HarshHotLifePenalty preference. 2015-03-08 23:44:18 -06:00
Kyzentun d3367d6a16 Add prompt for clearing an area in Edit Mode. Updated changelog. 2015-03-08 00:56:29 -07:00
Kyzentun c7ffbb3453 Lead in time before recording starts in edit mode is now a preference. 2015-01-31 14:03:30 -07:00
Kyzentun 0a4a81d5e8 Added a bunch of preferences to service options menu. 2014-12-20 19:39:38 -07:00
Kyzentun 9d41282242 Merge pull request #380 from kyzentun/pref_hide_note
Preference and mod for hiding notes that are hit
2014-12-01 16:14:51 -07:00
Jason Felds 3451b2f2d5 Use operator overloading best practices.
Not all files covered.

Refer to StackOverflow for details: http://stackoverflow.com/a/4421719
2014-11-26 14:51:21 -05:00
Kyzentun 040c0de509 Added MinTNSToHideNotes preference. 2014-11-19 15:59:21 -07:00
Kyzentun 9b847caa45 DefaultFailType preference removed because DefaultModifiers was overriding it. DefaultFailType ConfOptionRow now works by putting the fail type in DefaultModifiers.
Fixed double InitCommand bug in Foreground.
Disabled odd dimension check for screen texture.
2014-11-15 17:18:42 -07:00
Kyzentun 455431d8c3 Removed DefaultFail GamePref and reinstated DefaultFailType real preference. Should fix default fail related problems. 2014-09-15 00:04:41 -06:00
Colby Klein d4c7e4e781 Merge pull request #285 from kyzentun/ClearZPref
Added FastNoteRendering preference.
2014-08-31 18:15:25 -07:00
Kyzentun 71ed1df5e6 Added FastNoteRendering preference. 2014-08-31 17:17:48 -06:00
freem 4cf4e30bb9 Change LifeDifficulty to match StepMania 3.9's again (4=1.0) 2014-08-29 21:37:18 -05:00
Kyzentun 9b2c59de46 Added BackgroundFitMode preference and setting screen for controlling how backgrounds are fitted to the screen. 2014-08-16 03:37:24 -06:00
kyzentun 9a0219c6b6 Merge pull request #231 from kyzentun/ChangeGame
SetGame
2014-07-30 23:01:59 -06:00
Kyzentun 32e5d7e90c Improved three-key support. Default theme should be completely usable with three-key cabinets if ThreeKeyNavigation pref is true. Added ThreeKeyNavigation pref. ScreenOptions:NavigationMode metric now uses that pref to decide between normal and toggle modes. Added GoToFirstOnStart to OptionRowHandlerLua so an option row can control that behavior. Rewrote input for default's ScreenSelectProfile to use an input callback to take advantage of menu button mapping. Fixed inconsistent indentation in ORHL documentation. 2014-07-25 14:33:15 -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