From fc21919973793c7026dab96275cb1e6983ee1ee9 Mon Sep 17 00:00:00 2001 From: James H Ball Date: Mon, 23 Jun 2025 19:19:44 -0400 Subject: [PATCH] Revert build.yaml, fix FILE_EXTENSIONS usage --- .github/workflows/build.yaml | 1 + Source/PluginEditor.cpp | 6 ++---- Source/PluginProcessor.h | 32 ++++++++++++++++---------------- modules/osci_render_core | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6ab3adc2..0c71d957 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,7 @@ name: Build on: push: branches: + - main - develop workflow_dispatch: jobs: diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 624a7d82..c369d51e 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -130,10 +130,8 @@ bool OscirenderAudioProcessorEditor::isInterestedInFileDrag(const juce::StringAr } juce::File file(files[0]); juce::String ext = file.getFileExtension().toLowerCase(); - if (std::find(audioProcessor.FILE_EXTENSIONS.begin(), audioProcessor.FILE_EXTENSIONS.end(), ext) != audioProcessor.FILE_EXTENSIONS.end()) { - return true; - } - return false; + ext = ext.substring(1); // Remove the dot + return std::find(audioProcessor.FILE_EXTENSIONS.begin(), audioProcessor.FILE_EXTENSIONS.end(), ext) != audioProcessor.FILE_EXTENSIONS.end(); } void OscirenderAudioProcessorEditor::filesDropped(const juce::StringArray& files, int x, int y) { diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 4e122159..cc314bde 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -213,23 +213,23 @@ public: void removeParser(FileParser* parser); const std::vector FILE_EXTENSIONS = { - ".obj", - ".svg", - ".lua", - ".txt", - ".gpla", - ".gif", - ".png", - ".jpg", - ".jpeg", - ".wav", - ".aiff", - ".ogg", - ".flac", - ".mp3", + "obj", + "svg", + "lua", + "txt", + "gpla", + "gif", + "png", + "jpg", + "jpeg", + "wav", + "aiff", + "ogg", + "flac", + "mp3", #if OSCI_PREMIUM - ".mp4", - ".mov", + "mp4", + "mov", #endif }; diff --git a/modules/osci_render_core b/modules/osci_render_core index 4ddac1f6..a517f09b 160000 --- a/modules/osci_render_core +++ b/modules/osci_render_core @@ -1 +1 @@ -Subproject commit 4ddac1f6ff0853c989bf3ab619e0f1e0264f5a45 +Subproject commit a517f09beac37a919fe43772e98e779ffc1f0ba3