Skip to content

Commit

Permalink
Deleted lots of unused files and code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kblaschke committed Apr 29, 2023
1 parent 7bd470e commit b08a1ae
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 2,393 deletions.
9 changes: 1 addition & 8 deletions src/libprojectM/Audio/BeatDetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,11 @@
* you'll find it online
*/

#include <numeric>
#include <stdio.h>
#include <stdlib.h>

#include "wipemalloc.h"

#include "BeatDetect.hpp"
#include "PCM.hpp"

#include <algorithm>
#include <cmath>

#include <numeric>

namespace libprojectM {
namespace Audio {
Expand Down
8 changes: 0 additions & 8 deletions src/libprojectM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ add_library(projectM_main OBJECT
Audio/PCM.hpp
Audio/fftsg.cpp
Audio/fftsg.h
Common.hpp
HungarianMethod.hpp
IdleTextures.hpp
Preset.hpp
PresetFactory.cpp
PresetFactory.hpp
Expand All @@ -49,11 +46,7 @@ add_library(projectM_main OBJECT
RandomNumberGenerators.hpp
TimeKeeper.cpp
TimeKeeper.hpp
fatal.h
glError.h
gltext.h
projectM-opengl.h
resource.h
wipemalloc.cpp
wipemalloc.h
)
Expand Down Expand Up @@ -176,7 +169,6 @@ if(ENABLE_CXX_INTERFACE)
endif()

install(FILES
Common.hpp
Audio/PCM.hpp
ProjectM.hpp
DESTINATION "${PROJECTM_INCLUDE_DIR}/projectM-4"
Expand Down
87 changes: 0 additions & 87 deletions src/libprojectM/Common.hpp

This file was deleted.

191 changes: 0 additions & 191 deletions src/libprojectM/HungarianMethod.hpp

This file was deleted.

2 changes: 2 additions & 0 deletions src/libprojectM/MilkdropPreset/MilkdropPreset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ void MilkdropPreset::RenderFrame(const libprojectM::Audio::FrameAudioData& audio
// First evaluate per-frame code
PerFrameUpdate();

glViewport(0, 0, renderContext.viewportSizeX, renderContext.viewportSizeY);

m_framebuffer.Bind(m_previousFrameBuffer);
// Motion vector field. Drawn to the previous frame texture before warping it.
// Only do it after drawing one frame after init or resize.
Expand Down
18 changes: 15 additions & 3 deletions src/libprojectM/PresetFactoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
//
#include "PresetFactoryManager.hpp"

#include "Common.hpp"

#include <MilkdropPreset/MilkdropPresetFactory.hpp>

#include <algorithm>
#include <cassert>
#include <iostream>
#include <sstream>
Expand Down Expand Up @@ -135,4 +134,17 @@ std::vector<std::string> PresetFactoryManager::extensionsHandled() const
retval.push_back(element.first);
}
return retval;
}
}

//CPP17: std::filesystem::path::extension
auto PresetFactoryManager::ParseExtension(const std::string& filename) -> std::string
{
const auto start = filename.find_last_of('.');

if (start == std::string::npos || start >= (filename.length() - 1)) {
return "";
}
std::string ext = filename.substr(start + 1, filename.length());
std::transform(ext.begin(), ext.end(), ext.begin(), tolower);
return ext;
}
2 changes: 2 additions & 0 deletions src/libprojectM/PresetFactoryManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class PresetFactoryManager
private:
void registerFactory(const std::string& extension, PresetFactory* factory);

auto ParseExtension(const std::string& filename) -> std::string;

mutable std::map<std::string, PresetFactory*> m_factoryMap;
mutable std::vector<PresetFactory*> m_factoryList;
void ClearFactories();
Expand Down
Loading

0 comments on commit b08a1ae

Please sign in to comment.