mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Switched to lowercase
This commit is contained in:
parent
b62de5514c
commit
e90660c1a4
@ -369,7 +369,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
// Some very old beatmaps had incorrect type specifications for their backgrounds (ie. using 1 for VIDEO
|
// Some very old beatmaps had incorrect type specifications for their backgrounds (ie. using 1 for VIDEO
|
||||||
// instead of 0 for BACKGROUND). To handle this gracefully, check the file extension against known supported
|
// instead of 0 for BACKGROUND). To handle this gracefully, check the file extension against known supported
|
||||||
// video extensions and handle similar to a background if it doesn't match.
|
// video extensions and handle similar to a background if it doesn't match.
|
||||||
if (!OsuGameBase.VIDEO_EXTENSIONS.Contains(Path.GetExtension(filename).ToUpperInvariant()))
|
if (!OsuGameBase.VIDEO_EXTENSIONS.Contains(Path.GetExtension(filename).ToLowerInvariant()))
|
||||||
{
|
{
|
||||||
beatmap.BeatmapInfo.Metadata.BackgroundFile = filename;
|
beatmap.BeatmapInfo.Metadata.BackgroundFile = filename;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
//
|
//
|
||||||
// This avoids potential weird crashes when ffmpeg attempts to parse an image file as a video
|
// This avoids potential weird crashes when ffmpeg attempts to parse an image file as a video
|
||||||
// (see https://github.com/ppy/osu/issues/22829#issuecomment-1465552451).
|
// (see https://github.com/ppy/osu/issues/22829#issuecomment-1465552451).
|
||||||
if (!OsuGameBase.VIDEO_EXTENSIONS.Contains(Path.GetExtension(path).ToUpperInvariant()))
|
if (!OsuGameBase.VIDEO_EXTENSIONS.Contains(Path.GetExtension(path).ToLowerInvariant()))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
storyboard.GetLayer("Video").Add(new StoryboardVideo(path, offset));
|
storyboard.GetLayer("Video").Add(new StoryboardVideo(path, offset));
|
||||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (OsuGameBase.VIDEO_EXTENSIONS.Contains(File.Extension.ToUpperInvariant()))
|
if (OsuGameBase.VIDEO_EXTENSIONS.Contains(File.Extension.ToLowerInvariant()))
|
||||||
return FontAwesome.Regular.FileVideo;
|
return FontAwesome.Regular.FileVideo;
|
||||||
|
|
||||||
switch (File.Extension)
|
switch (File.Extension)
|
||||||
|
@ -71,7 +71,7 @@ namespace osu.Game
|
|||||||
[Cached(typeof(OsuGameBase))]
|
[Cached(typeof(OsuGameBase))]
|
||||||
public partial class OsuGameBase : Framework.Game, ICanAcceptFiles, IBeatSyncProvider
|
public partial class OsuGameBase : Framework.Game, ICanAcceptFiles, IBeatSyncProvider
|
||||||
{
|
{
|
||||||
public static readonly string[] VIDEO_EXTENSIONS = { ".MP4", ".MOV", ".AVI", ".FLV", ".MPG", ".WMV", ".M4V" };
|
public static readonly string[] VIDEO_EXTENSIONS = { ".mp4", ".mov", ".avi", ".flv", ".mpg", ".wmv", ".m4v" };
|
||||||
|
|
||||||
public const string OSU_PROTOCOL = "osu://";
|
public const string OSU_PROTOCOL = "osu://";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user