1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00
Commit Graph

59723 Commits

Author SHA1 Message Date
Bartłomiej Dach
2e3daf0a54
Fix leak of ModSettingChangeTracker instances
The `SelectedMods.BindValueChanged()` callback in `ModSelectOverlay` can
in some instances run recursively. This is most heavily leaned on in
scenarios where `SelectedMods` is updated by an external component. In
such cases, the mod select overlay needs to replace the mod instances
received externally with mod instances which it owns, so that the changes
made on the overlay can propagate outwards.

This in particular means that prior to this commit, it was possible to
encounter the following scenario:

	modSettingChangeTracker?.Dispose();
	updateFromExternalSelection(); // mutates SelectedMods to perform the replacement
	                               // therefore causing a recursive call

		modSettingChangeTracker?.Dispose();
		// inner call continues
		modSettingChangeTracker = new ModSettingChangeTracker(SelectedMods.Value);

	// outer call continues
	modSettingChangeTracker = new ModSettingChangeTracker(SelectedMods.Value);

This leaks one `modSettingChangeTracker` instance from the inner call,
which is never disposed.

To avoid this, move the disposal to the same side of the recursion that
the creation happens on, changing the call pattern to:

	updateFromExternalSelection(); // mutates SelectedMods to perform the replacement
	                               // therefore causing a recursive call

		modSettingChangeTracker?.Dispose();
		// inner call continues
		modSettingChangeTracker = new ModSettingChangeTracker(SelectedMods.Value);

	modSettingChangeTracker?.Dispose();
	// outer call continues
	modSettingChangeTracker = new ModSettingChangeTracker(SelectedMods.Value);

which, while slightly wasteful, does not cause any leaks.

The solution is definitely suboptimal, but addressing this properly
would entail a major rewrite of the mod instance management in the mods
overlay, which is probably not the wisest move to make right now.
2023-04-30 17:31:41 +02:00
Bartłomiej Dach
d35355970f
Add test case covering failure scenario 2023-04-30 17:23:45 +02:00
Hy0tic
80301f0fc9 Merge https://github.com/Hy0tic/osu 2023-04-22 13:32:41 -04:00
Hy0tic
56ab029a58 fix issue where multipler does not update when adjusting speed for preset mod 2023-04-22 13:30:08 -04:00
Bartłomiej Dach
36113f60b7
Merge pull request #23248 from peppy/default-beat-divisor
Change default beat divisor to 1/4 snap
2023-04-22 19:23:18 +02:00
Dean Herbert
1066dfcbf6 Change default beat divisor to 4
This matches stable, and is a much saner default value.

Will apply to new beatmaps and also beatmaps which don't specify a snap
value in the `.osu` file.
2023-04-20 14:35:13 +09:00
Dean Herbert
cc96d275c2
Merge pull request #23228 from smoogipoo/shader-cache-stages
Apply framework changes to custom ShaderManager
2023-04-19 21:49:21 +09:00
Dean Herbert
01260e5f54 Merge branch 'master' into shader-cache-stages 2023-04-19 20:47:34 +09:00
Dean Herbert
760ef10145 Update framework 2023-04-19 00:04:21 +09:00
Dean Herbert
ee5658c15a
Merge pull request #23222 from peppy/update-framework-resources
Update framework and resources
2023-04-18 14:10:42 +09:00
Dean Herbert
26a2d1fdea
Merge pull request #23000 from Joehuu/fix-beatmap-terminology
Fix song select matching label not using right terminology
2023-04-18 13:53:05 +09:00
Joseph Madamba
c80a25328d
Shorten label to just "matches" 2023-04-17 20:59:41 -07:00
Joseph Madamba
16df92f405
Fix sets not being plural 2023-04-17 20:59:02 -07:00
Dan Balasescu
c0a25144cf Apply changes to custom ShaderManager 2023-04-18 11:31:56 +09:00
Dean Herbert
c3f3b8db7c Update resources 2023-04-17 23:09:46 +09:00
Dean Herbert
fbb15fff26 Update framework 2023-04-17 23:03:16 +09:00
Dean Herbert
7aeab174eb
Merge pull request #23185 from bdach/nested-result-revert
Invoke `RevertResult` on parent DHO when nested DHO is reverted
2023-04-12 23:08:10 +09:00
Dean Herbert
c326a98af5
Merge pull request #23189 from bdach/do-not-lookup-local-beatmaps
Do not look up metadata from online sources for locally-modified beatmaps on save
2023-04-12 21:55:10 +09:00
Bartłomiej Dach
e72f103c17
Do not look up metadata for locally-modified beatmaps on save 2023-04-11 23:14:35 +02:00
Bartłomiej Dach
db86ced4b4
Invoke RevertResult on parent DHO when nested DHO is reverted
The behaviour described above was removed in
812a4b412a, thus henceforth
contradicting `RevertResult`'s xmldoc. As it is relied on by some
external rulesets, bring it back to unbreak them.
2023-04-11 18:29:08 +02:00
Bartłomiej Dach
0cc92ce5f9
Add failing test case
Covering nested object reverts not firing the parent's `RevertResult`
event in accordance with what the xmldoc of the event states.
2023-04-11 18:24:34 +02:00
Joseph Madamba
d0cbe206a9
Revert back to one number with "matching beatmap difficulties" label 2023-04-10 23:37:29 -07:00
Joseph Madamba
f0c8a3202b
Merge remote-tracking branch 'upstream/master' into fix-beatmap-terminology 2023-04-10 23:22:15 -07:00
Dean Herbert
e58e1151f3
Merge pull request #23178 from Joehuu/fix-count-not-updating-when-deleting
Fix song select beatmap difficulty count not updating when deleting
2023-04-11 09:46:41 +09:00
Dean Herbert
52bb7891f7
Merge branch 'master' into fix-count-not-updating-when-deleting 2023-04-11 09:04:02 +09:00
Joseph Madamba
f80de08f24
Adjust BeatmapSetsChanged xmldoc
Co-Authored-By: Dean Herbert <pe@ppy.sh>
2023-04-10 11:28:23 -07:00
Joseph Madamba
c7dea71793
Use existing BeatmapSetsChanged action 2023-04-10 11:26:18 -07:00
Dean Herbert
8757276c37
Merge pull request #23156 from Micha-ohne-el/editor-selection-rotation-snapping
Add rotation snapping to editor selection
2023-04-11 00:45:44 +09:00
Dean Herbert
52c4703261
Merge pull request #23103 from Joehuu/normalise-overlay-padding
Normalise horizontal padding on overlays
2023-04-10 23:48:59 +09:00
Bartłomiej Dach
184f6d2dd4
Merge pull request #23087 from cdwcgt/gd-onlinesetoverlay
Show guest difficulty author in beatmap overlay
2023-04-10 16:30:10 +02:00
Bartłomiej Dach
1f2c96c8e8
Merge branch 'master' into gd-onlinesetoverlay 2023-04-10 15:35:03 +02:00
Bartłomiej Dach
6e08105e2c
Remove usage of "diff" vernacular 2023-04-10 15:27:10 +02:00
Bartłomiej Dach
11fd93a2ba
Inline disturbing getGuestMapper() method
Disturbing because name suggests pure method, but it is in fact `void`
and also performs side effects by about the most confusing means
possible.
2023-04-10 15:20:43 +02:00
Bartłomiej Dach
1255d489fc
Merge pull request #23133 from peppy/editor-inspector
Add hit object inspector to editor
2023-04-10 15:13:33 +02:00
Bartłomiej Dach
73bd0feef5
Fix incorrectly implemented localisation 2023-04-10 15:03:33 +02:00
Bartłomiej Dach
6fec476147
Simplify snap implementation 2023-04-10 14:55:30 +02:00
Bartłomiej Dach
ead5e9f027
Merge branch 'master' into editor-inspector 2023-04-10 14:29:05 +02:00
Dean Herbert
0d696f8938
Merge pull request #23177 from smoogipoo/progressive-dt-multiplier
Add progressive DT/HT mod multipliers
2023-04-10 21:27:48 +09:00
Bartłomiej Dach
60358c7203
Perform first inspector text update immediately
Provides better and more consistent initial state for the inspector.
2023-04-10 14:13:53 +02:00
Bartłomiej Dach
641415ca32
Unify displayed duration format for single/multiple selection 2023-04-10 14:05:32 +02:00
Dan Balasescu
ad51f880e0 Remove overrides on DC/NC mods 2023-04-10 17:49:29 +09:00
Joseph Madamba
7f5b99c91b
Fix song select beatmap difficulty count not updating when deleting 2023-04-09 22:12:51 -07:00
Joseph Madamba
bfb7ead689
Add failing text box beatmap difficulty count test 2023-04-09 22:12:50 -07:00
Dan Balasescu
15f6bc155e Add progressive score multiplier for HT 2023-04-10 13:35:48 +09:00
Dan Balasescu
c923482976 Add progressive score multiplier for DT 2023-04-10 13:31:48 +09:00
Dean Herbert
8d2e852ffd Fix overbearing key down handling 2023-04-08 22:30:36 +09:00
Dean Herbert
a1fc4def1d Remove redundant method override 2023-04-08 22:18:07 +09:00
Micha Lehmann
3c4a25e53f Fix tooltip text not resetting when ending an editor rotation 2023-04-08 14:28:52 +02:00
Micha Lehmann
580d5745c0 Add "(snapped)" to the tooltip when snap-rotating in the editor 2023-04-08 14:15:49 +02:00
Joseph Madamba
a86a968fac
Use public BeatmapSet to match other usages 2023-04-07 21:16:36 -07:00