Commit Graph

1877 Commits

Author SHA1 Message Date
Dean Herbert f3faad74d5
Merge pull request #12003 from UselessToucan/ef_core_5 2021-03-15 15:05:32 +09:00
Dean Herbert 6d4c1ba2ae Fix a couple of new inspections introduced in Rider EAPs 2021-03-15 13:35:08 +09:00
Roman Kapustin 0a1e325fc7 Extract requerying of navigational properties from DbContext 2021-03-14 19:34:53 +03:00
Roman Kapustin 47b80d2474 Workaround InvalidOperation exceptions 2021-03-11 20:51:54 +03:00
Dean Herbert b1cd01ceb8 Apply ConfigureAwait changes to game side 2021-03-08 14:36:35 +09:00
Dean Herbert 103dd4a6ce Remove WorkingBeatmap's finalizer 2021-03-02 16:14:43 +09:00
Dan Balasescu 46ea0f44eb
Merge branch 'master' into beatmap-difficulty-cache-nullable 2021-02-25 22:52:15 +09:00
Dean Herbert 5fa9bf61b6 Update xmldoc 2021-02-25 16:22:40 +09:00
Dean Herbert 03771ce8ec Allow determining a BeatmapDifficultyCache's bindable return's completion state via nullability 2021-02-25 16:19:01 +09:00
smoogipoo dff1d80f39 Update HasFlag usages to HasFlagFast 2021-02-25 15:38:56 +09:00
Dean Herbert dfedea9ea2 Move preview point logic to a specific method in WorkingBeatmap 2021-02-18 14:55:44 +09:00
Dean Herbert e7308193e7 Add xmldoc explaining how PreviewTime is intended to work 2021-02-18 13:03:29 +09:00
Dean Herbert a080a9bdbc
Merge pull request #11603 from Game4all/handle-stable-imports-custom-songs-folder
Handle beatmap import from a stable installation with a custom Songs directory
2021-02-12 21:42:36 +09:00
smoogipoo a1be3c8bfd Fix header background being invisible in multiplayer/playlists 2021-02-12 15:27:37 +09:00
Dean Herbert 5f23bd7259 Revert most of the changes to ArchiveModeManager by using better code 2021-02-12 12:48:32 +09:00
smoogipoo 18e3f8c233 Sort beat lengths rather than linear search 2021-02-08 19:03:19 +09:00
smoogipoo b40b159acb Round beatlength 2021-02-08 18:52:50 +09:00
smoogipoo 69ca440ae5 Merge branch 'master' into more-accurate-most-common-bpm 2021-02-08 18:40:58 +09:00
Bartłomiej Dach b9a49d5589 Coerce undefined animation loop types to Forever 2021-01-31 15:43:58 +01:00
Dean Herbert 16f3d1815f Fix SQLite exception thrown is a beatmap lookup is attempted without an OnlineBeatmapID present
It turns out the SQLite API isn't smart enough to handle nullables
directly, so we need to help it out a bit.

Stops the following from being thrown:

```
System.InvalidOperationException: Value must be set.
   at Microsoft.Data.Sqlite.SqliteParameter.Bind(sqlite3_stmt stmt) = 3
at
   at Microsoft.Data.Sqlite.SqliteParameterCollection.Bind(sqlite3_stmt
stmt) = 3 at
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior
behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
   at
osu.Game.Beatmaps.BeatmapManager.BeatmapOnlineLookupQueue.checkLocalCache(BeatmapSetInfo
set, BeatmapInfo beatmap) in
/Users/dean/Projects/osu/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs:line
166 = 166
```
2021-01-29 19:53:57 +09:00
Dean Herbert c3d4044017 Avoid using Dapper to fix iOS compatibility of beatmap lookup cache 2021-01-28 16:53:56 +09:00
Lucas A 383c40b992 Address remaining reviews suggestions. 2021-01-26 20:35:42 +01:00
Lucas A 9f9206726a Fix typos. 2021-01-26 18:11:54 +01:00
Dean Herbert 4ac362ee1a Move cloning local to editor 2021-01-25 18:29:00 +09:00
Dean Herbert f054b38105 Merge branch 'master' into revert-beatmap-controlpointinfo-cloning 2021-01-25 18:25:53 +09:00
Lucas A 51d4da565c Fix ArchiveModelManagers lookup paths. 2021-01-24 22:25:49 +01:00
Dean Herbert edb6d3907b
Merge pull request #11472 from frenzibyte/explicit-beatmap-markers
Add explicit content markers to beatmap panels and overlay
2021-01-17 21:44:10 +09:00
Dean Herbert d6e6b4bbee Revert forced cloning of ControlPointInfo
This reverts commit 3c3e860dbc.

Closes https://github.com/ppy/osu/issues/11491.
2021-01-15 17:34:59 +09:00
smoogipoo 24e991a5ef Actually return beat length and not BPM 2021-01-15 14:35:09 +09:00
smoogipoo c6e9a6cd5a Make most common BPM more accurate 2021-01-15 14:28:49 +09:00
Dean Herbert 8a0b975d71 Fix deadlock scenario when calculating fallback difficulty
The previous code would run a calcaulation for the beatmap's own ruleset
if the current one failed. While this does make sense, with the current
way we use this component (and the implementation flow) it is quite unsafe.

The to the call on `.Result` in the `catch` block, this would 100%
deadlock due to the thread concurrency of the `ThreadedTaskScheduler`
being 1. Even if the nested run could be run inline (it should be), the
task scheduler won't even get to the point of checking whether this is
feasible due to it being saturated by the already running task.

I'm not sure if we still need this fallback lookup logic. After removing
it, it's feasible that 0 stars will be returned during the scenario that
previously caused a deadlock, but I don't necessarily think this is
incorrect. There may be another reason for this needing to exist which
I'm not aware of (diffcalc?) but if that's the case we may want to move
the try-catch handling to the point of usage.

To reproduce the deadlock scenario with 100% success (the repro
instructions in the linked issue aren't that simple and require some
patience and good timing), the main portion of the lookup can be changed
to randomly trigger a nested lookup:

```
if (RNG.NextSingle() > 0.5f)
    return GetAsync(new
DifficultyCacheLookup(key.Beatmap, key.Beatmap.Ruleset,
key.OrderedMods)).Result;
else
    return new StarDifficulty(attributes);
```

After switching beatmap once or twice, pausing debug and viewing the
state of threads should show exactly what is going on.
2021-01-14 18:25:34 +09:00
Salman Ahmed e8daea91d2 Add online beatmap "explicit content" property 2021-01-13 12:13:14 +03:00
smoogipoo 9a22df2b88 Fix BPM multiplier not working in all cases 2021-01-12 17:50:22 +09:00
Dean Herbert 3c3e860dbc Move ControlPointInfo copying to base Beatmap.Clone method (and remove setter) 2021-01-07 23:52:04 +09:00
Dean Herbert 00dc98e3ab Make legacy control point's BpmMultiplier setter private again 2021-01-07 19:06:52 +09:00
Dean Herbert 69ac22dd7f Fix incorrectly copy pasted xmldoc 2021-01-07 19:06:10 +09:00
Dean Herbert 31a6e9b860 Remove unused using 2021-01-05 14:24:49 +09:00
Dean Herbert afab35a31a Fix missing copy implementation in LegacySampleControlPiont 2021-01-05 13:41:31 +09:00
Dean Herbert caa88c6100 Use CreateCopy instead of Clone interface
I was going for conformity by using the IClonable interface, but it
doesn't look like we use it anywhere else in the project.
2021-01-05 13:13:52 +09:00
Dean Herbert ba4e411422 Clone and copy ControlPointInfo when retrieving a playable beatmap 2021-01-04 16:37:07 +09:00
Dean Herbert d7279dab40
Merge pull request #11226 from peppy/fix-legacy-skin-texture-loader-store
Fix incorrectly provided texture loader store to skins
2020-12-23 16:41:01 +09:00
Dean Herbert 807c1ecd1f Refactor recommendation iteration code to read better 2020-12-22 14:57:32 +09:00
Dean Herbert 8cc2ed3fae Move from OsuGameBase to OsuGame
Also moves to a more suitable namespace.
2020-12-22 14:28:27 +09:00
Dean Herbert 85518b4d99 Enforce non-null for BeatmapManager WorkingBeatmap resources 2020-12-22 12:06:10 +09:00
Dean Herbert a97a2b2a66 Add nullability to BeatmapManager's GameHost reference 2020-12-22 12:03:25 +09:00
Dean Herbert 10c2745682 Add region specifications around implicit interface implementations 2020-12-22 12:01:09 +09:00
Dean Herbert a5bcf1dc20 Expose resources to skin via interface (and share common pieces with beatmap) 2020-12-21 15:18:52 +09:00
Dean Herbert 0ffbe12fcc Expose resources to beatmaps in a saner way 2020-12-21 14:22:34 +09:00
Dean Herbert 7c804be4d3 Rename textureStore to make its purpose more clear 2020-12-21 14:06:33 +09:00
Dean Herbert a35060ea7a Add a simple cache-busting query string to online.db retrieval
As we are finally pushing updates for this database, this adds a minimum
level of guarantee that a client will request a new version (without
having to worry about multiple levels of server-side caching).
2020-12-11 17:56:02 +09:00