1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 00:12:54 +08:00
Commit Graph

59786 Commits

Author SHA1 Message Date
Dean Herbert
e808e7316b Mark delegate value unused and add comment to avoid future regression 2023-05-02 13:29:30 +09:00
Bartłomiej Dach
7cedbca9be
Merge branch 'master' into multiplier-doesnt-update-with-preset-mod 2023-04-30 17:36:00 +02:00
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
Bartłomiej Dach
6a04708a7e
Merge pull request #23332 from peppy/fix-exclusive-fullscreen-detection
Fix exclusive fullscreen notice showing false positives for new renderers
2023-04-29 15:30:04 +02:00
Bartłomiej Dach
646d4965b9
Merge branch 'master' into fix-exclusive-fullscreen-detection 2023-04-29 14:39:34 +02:00
Dean Herbert
119687cf6e
Merge pull request #23329 from rltn/clickable-country-name-in-profile
Clickable country name in profile
2023-04-29 14:19:13 +09:00
Dean Herbert
8df5410946
Merge pull request #23333 from Cootz/add-events-for-loading-screen
Fix editor potentially leaving a dangling beatmap if exiting during load too fast
2023-04-29 11:57:24 +09:00
Dean Herbert
602a276884
Merge branch 'master' into add-events-for-loading-screen 2023-04-29 11:05:45 +09:00
Dean Herbert
2643100644 Add xmldoc to new test mentioning failure rate and general purpose 2023-04-29 11:05:10 +09:00
Dean Herbert
32f8c674f4 Extract beatmap retrieval method for more legibility 2023-04-29 11:01:29 +09:00
Dean Herbert
a6f0186112 Improve legibility and code quality of new test 2023-04-29 10:51:56 +09:00
Dean Herbert
428b5fad3c Rename test scene to explicitly mention navigation testing 2023-04-29 10:51:56 +09:00
Cootz
d9b3c97179 Fix testing 2023-04-29 10:29:33 +09:00
Cootz
c5357d30ab Add test 2023-04-29 10:29:33 +09:00
Cootz
607a04ae73 Fix the issue 2023-04-29 10:29:33 +09:00
_ltn
2d6c0d2900 use of Child instead of Children 2023-04-28 19:24:07 +03:00
Dean Herbert
6929be49b7 Change condition for exclusive fullscreen notice to only show when using the correct renderer
This avoids the notice showing when running on windows, but using the
newer renderers (where the underlying logic hasn't been tested properly
and can result in false-positives).

Supersedes https://github.com/ppy/osu-framework/pull/5759 as a more
correct implementation.
2023-04-28 22:36:30 +09:00
_ltn
4b0ee392f6 add OsuHoverContainer 2023-04-28 05:48:54 +03:00
_ltn
17730f05bc remove UpdateableCountryText 2023-04-28 05:47:05 +03:00
Dean Herbert
6308bef0c8
Merge pull request #23325 from sw1tchbl4d3r/taiko_aspect_limit
Fix extreme aspect ratios in taiko
2023-04-28 09:39:53 +09:00
_ltn
4d144cd5b5 clearing the code 2023-04-28 02:06:13 +03:00
_ltn
092377fdaa moving UpdateableCountryText 2023-04-28 01:47:14 +03:00
_ltn
e9843f2066 replace country text object 2023-04-28 01:16:50 +03:00
_ltn
b13201fb79 UpdateableCountryText rewrite 2023-04-28 01:14:42 +03:00
_ltn
f5c652325a Create UpdateableCountryText.cs 2023-04-27 23:44:18 +03:00
Bartłomiej Dach
1959c2daeb
Merge pull request #23307 from peppy/fix-storyboard-loop-end-time
Fix some storyboard loops not playing for as long as expected
2023-04-26 22:42:45 +02:00
Bartłomiej Dach
07efa7d660
Merge branch 'master' into fix-storyboard-loop-end-time 2023-04-26 21:53:26 +02:00
sw1tchbl4d3
76df5fd3e2 Limit taiko playfield aspect ratio to 5:4 - 16:9 2023-04-26 18:05:47 +02:00
Dean Herbert
58ace1d613
Merge pull request #23275 from Terochi/catch-lag-spike-fix
Fix huge lag spike on new combo in osu!catch
2023-04-26 16:29:43 +09:00
Dean Herbert
61b62b35f5
Merge pull request #18626 from ggliv/decouple-mod-fails
Allow ModFailCondition to arbitrarily trigger failures
2023-04-26 16:19:42 +09:00
Dean Herbert
cb7b246e33 Fix naming and update in line with nullability 2023-04-26 15:27:58 +09:00
Dean Herbert
210c5e7c53 Merge branch 'master' into decouple-mod-fails 2023-04-26 15:26:20 +09:00
Dean Herbert
6a3b587374
Merge pull request #23260 from Haspamelodica/master
Fix some videos with uppercase file extensions not displaying correctly in-game
2023-04-26 14:29:25 +09:00
Dean Herbert
1efc78c0f8 Actually use new end time property when setting lifetimes 2023-04-26 13:28:51 +09:00
Bartłomiej Dach
5ec8ecb11b
Merge pull request #23309 from peppy/key-counters-fix
Fix key counters counting during break time
2023-04-25 21:15:12 +02:00
Bartłomiej Dach
196b5b41eb
Also disable counting on argon display in test
Mostly for my own peace of mind.
2023-04-25 20:17:57 +02:00
Bartłomiej Dach
753fa09356
Fix test failures due to type mismatch 2023-04-25 20:10:11 +02:00
Daniel Kirschten
54e8aa8fe9
Merge branch 'master' into master 2023-04-25 16:04:02 +02:00
Dean Herbert
14af2063e5
Merge pull request #23247 from peppy/round-editor-rotation
Always round editor rotation to integer values
2023-04-25 21:43:44 +09:00
Dean Herbert
e08d7daffd Don't show decimal point in tooltip 2023-04-25 21:43:14 +09:00
Dean Herbert
6b4032e34b Add missing binding of IsCounting with contained counters 2023-04-25 21:37:19 +09:00
Dean Herbert
0a861ffcee Restructure key counters to use a common flow 2023-04-25 21:37:19 +09:00
Dean Herbert
0c3a015953 Fix key counter test not testing the full binding of IsCounting 2023-04-25 21:37:19 +09:00
Dean Herbert
807a139877
Merge pull request #22655 from ItsShamed/gameplay/argon-key-counter_le-retour
Implement new design of Key Counter
2023-04-25 21:11:04 +09:00
Dean Herbert
7630958633 Stop using Drawable.Name to convey actual UI information 2023-04-25 20:24:36 +09:00
Dean Herbert
dd2c289ce9 Remove pointless default value 2023-04-25 20:22:12 +09:00
Dean Herbert
d8b4db3a13
Merge branch 'master' into gameplay/argon-key-counter_le-retour 2023-04-25 19:54:31 +09:00
Dean Herbert
e330052852 Add second definition of EndTime for storyboard elements to account for loops in lifetime 2023-04-25 15:22:11 +09:00
Dean Herbert
dce0c5fac8 Add test coverage of expected behaviour for playback of loops with no explicit end time 2023-04-25 15:14:32 +09:00