Browse Source

Only show rename message if filename ends in ogg

master 4.5.0
Thomas Cheyney 4 years ago
parent
commit
644a77a8cf
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      Config/DefaultGame.ini
  2. +4
    -1
      Source/MediocreMapAssistant2/BPFileIO.cpp

+ 1
- 1
Config/DefaultGame.ini View File

@ -3,7 +3,7 @@ ProjectID=F5529D354BF9DDA5B4BC06BB62D10933
bShouldWindowPreserveAspectRatio=False bShouldWindowPreserveAspectRatio=False
ProjectName=MediocreMapAssistant2 ProjectName=MediocreMapAssistant2
ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "A4F171D24A09E6B0C435A39031D526F5", "Mediocre Map Assistant 2") ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "A4F171D24A09E6B0C435A39031D526F5", "Mediocre Map Assistant 2")
ProjectVersion=4.4.0
ProjectVersion=4.5.0
[/Script/UnrealEd.ProjectPackagingSettings] [/Script/UnrealEd.ProjectPackagingSettings]
Build=IfProjectHasCode Build=IfProjectHasCode


+ 4
- 1
Source/MediocreMapAssistant2/BPFileIO.cpp View File

@ -181,7 +181,10 @@ FString UBPFileIO::CheckAudioFormatMatches(const FString & TestPath)
for (int i = 0; i < 1024; i++) { for (int i = 0; i < 1024; i++) {
if ((FileData[i] << 8 | (FileData[i+1] & 0xF0)) == 0xFFF0) { if ((FileData[i] << 8 | (FileData[i+1] & 0xF0)) == 0xFFF0) {
if (CheckFrameInfo(FileData, i, 0) != -1) { if (CheckFrameInfo(FileData, i, 0) != -1) {
return "That looks like an MP3, you can't just rename files to change their type.\nGo get audacity and convert it properly.";
if (TestPath.EndsWith(".ogg")) {
return "That looks like an MP3, you can't just rename files to change their type.\nGo get audacity and convert it properly.";
}
return "That looks like an MP3, but it needs to be an ogg.\nPlease use audacity to convert it.";
} }
return unknownProblem; return unknownProblem;


Loading…
Cancel
Save