diff --git a/src/libprojectM/MilkdropPresetFactory/MilkdropPresetFactory.cpp b/src/libprojectM/MilkdropPresetFactory/MilkdropPresetFactory.cpp index aff752a44..8da53f845 100644 --- a/src/libprojectM/MilkdropPresetFactory/MilkdropPresetFactory.cpp +++ b/src/libprojectM/MilkdropPresetFactory/MilkdropPresetFactory.cpp @@ -229,7 +229,7 @@ MilkdropPresetFactory::LoadPresetFromFile(const std::string& filename) { return IdlePresets::allocate(this, presetOutputs); } - else if (protocol == "" or protocol == "file") + else if (protocol == "" || protocol == "file") { return std::make_unique(this, path, presetOutputs); } diff --git a/src/libprojectM/MilkdropPresetFactory/Parser.cpp b/src/libprojectM/MilkdropPresetFactory/Parser.cpp index c1416e872..eedc52e1a 100755 --- a/src/libprojectM/MilkdropPresetFactory/Parser.cpp +++ b/src/libprojectM/MilkdropPresetFactory/Parser.cpp @@ -4,7 +4,7 @@ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU -* License as published by the Free Software Foundation; either + * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, @@ -18,35 +18,33 @@ * See 'LICENSE.txt' included within this release * */ -/* parser.c */ -#include -#include +#include "Parser.hpp" + +#include "BuiltinFuncs.hpp" +#include "CustomShape.hpp" +#include "CustomWave.hpp" +#include "Eval.hpp" +#include "Expr.hpp" +#include "Func.hpp" +#include "InitCond.hpp" +#include "MilkdropPresetFactory.hpp" +#include "Param.hpp" +#include "ParamUtils.hpp" +#include "PerFrameEqn.hpp" +#include "PerPixelEqn.hpp" +#include "fatal.h" +#include "wipemalloc.h" + +#include #include #include #include -#include - -#include "fatal.h" - -#include "CustomWave.hpp" -#include "CustomShape.hpp" -#include "Expr.hpp" -#include "Eval.hpp" -#include "Func.hpp" -#include "InitCond.hpp" -#include "Param.hpp" -#include "Parser.hpp" -#include "PerFrameEqn.hpp" -#include "PerPixelEqn.hpp" #include -#include "ParamUtils.hpp" - -#include "wipemalloc.h" -#include #include -#include "BuiltinFuncs.hpp" -#include "MilkdropPresetFactory.hpp" +#include +#include +#include /* Grabs the next token from the file. The second argument points to the raw string */ diff --git a/src/libprojectM/Preset.hpp b/src/libprojectM/Preset.hpp index 9d68cd0eb..ba7e24783 100644 --- a/src/libprojectM/Preset.hpp +++ b/src/libprojectM/Preset.hpp @@ -1,8 +1,10 @@ #pragma once -#include -#include -#include +#include + +class BeatDetect; +class Pipeline; +class PipelineContext; class Preset { diff --git a/src/libprojectM/PresetFactory.cpp b/src/libprojectM/PresetFactory.cpp index 09083384f..2fe73e514 100644 --- a/src/libprojectM/PresetFactory.cpp +++ b/src/libprojectM/PresetFactory.cpp @@ -1,5 +1,9 @@ #include "PresetFactory.hpp" +#ifdef DEBUG +#include +#endif + const std::string PresetFactory::IDLE_PRESET_PROTOCOL("idle"); std::string PresetFactory::Protocol(const std::string& url, std::string& path) diff --git a/src/libprojectM/PresetFactoryManager.cpp b/src/libprojectM/PresetFactoryManager.cpp index 1d9bf3929..d85df0b86 100644 --- a/src/libprojectM/PresetFactoryManager.cpp +++ b/src/libprojectM/PresetFactoryManager.cpp @@ -11,8 +11,12 @@ // #include "PresetFactoryManager.hpp" +#include "Common.hpp" + #include +#include +#include #include PresetFactoryManager::~PresetFactoryManager() diff --git a/src/libprojectM/PresetFactoryManager.hpp b/src/libprojectM/PresetFactoryManager.hpp index dcea6357f..748adf073 100644 --- a/src/libprojectM/PresetFactoryManager.hpp +++ b/src/libprojectM/PresetFactoryManager.hpp @@ -1,9 +1,11 @@ #pragma once -#include - #include "PresetFactory.hpp" +#include +#include +#include + /// A simple exception class to strongly type all preset factory related issues class PresetFactoryException : public std::exception { diff --git a/src/libprojectM/ProjectM.hpp b/src/libprojectM/ProjectM.hpp index 8bb48a393..8c3ab2f95 100644 --- a/src/libprojectM/ProjectM.hpp +++ b/src/libprojectM/ProjectM.hpp @@ -45,7 +45,7 @@ #include "BackgroundWorker.h" -#include +#include "Renderer/PipelineContext.hpp" #include #include diff --git a/src/libprojectM/libprojectM_shared.cmake b/src/libprojectM/libprojectM_shared.cmake index 8667ffe6a..aa75ea59c 100644 --- a/src/libprojectM/libprojectM_shared.cmake +++ b/src/libprojectM/libprojectM_shared.cmake @@ -23,12 +23,6 @@ set_target_properties(projectM_shared PROPERTIES target_include_directories(projectM_shared PUBLIC - "$" - "$" - "$" - "$" - "$" - "$" "$" ) diff --git a/src/libprojectM/libprojectM_static.cmake b/src/libprojectM/libprojectM_static.cmake index 6b840eda2..860bf6049 100644 --- a/src/libprojectM/libprojectM_static.cmake +++ b/src/libprojectM/libprojectM_static.cmake @@ -21,12 +21,6 @@ set_target_properties(projectM_static PROPERTIES target_include_directories(projectM_static PUBLIC - "$" - "$" - "$" - "$" - "$" - "$" "$" ) diff --git a/src/sdl-test-ui/audioCapture.cpp b/src/sdl-test-ui/audioCapture.cpp index 169abfdf0..755f9467b 100644 --- a/src/sdl-test-ui/audioCapture.cpp +++ b/src/sdl-test-ui/audioCapture.cpp @@ -75,7 +75,6 @@ int projectMSDL::toggleAudioInput() { CurAudioDevice = -1; // Return to the default audio device. #ifdef WASAPI_LOOPBACK // If we are at the boundary and WASAPI is enabled then let's load WASAPI instead. - projectm_set_toast_message(_projectM, "Loopback audio selected"); SDL_Log("Loopback audio selected"); this->fakeAudio = false; // disable fakeAudio in case it was enabled. this->wasapi = true; // Track wasapi as on so projectMSDL will listen to it. diff --git a/src/sdl-test-ui/opengl.h b/src/sdl-test-ui/opengl.h new file mode 100644 index 000000000..2ae4dd912 --- /dev/null +++ b/src/sdl-test-ui/opengl.h @@ -0,0 +1,50 @@ +/** + Include appropriate OpenGL headers for this platform. +**/ + +#ifndef __PROJECTM_OPENGL_H__ +#define __PROJECTM_OPENGL_H__ + +// stuff that needs to be ported to newer GL calls +#define GL_TRANSITION + +// Enable openGL extra checks, better not be enabled in release build +#define OGL_DEBUG 0 + +// Unlock FPS for rendering benchmarks, it disables Vblank/Vsync and prints drawn frame count within a 5s test run +#define UNLOCK_FPS 0 + +// If a shader compilation failure occurs, it dumps shader source into /tmp instead of stderr +#define DUMP_SHADERS_ON_ERROR 0 + +#ifdef __APPLE__ +# include +# include +#elif defined(EYETUNE_WINRT) +#define GL_GLEXT_PROTOTYPES +#define GLM_FORCE_CXX03 +#include +#include +#include +#include +#include +#include +#elif defined(_WIN32) +#define GLM_FORCE_CXX03 +# include +#include "GL/glew.h" +#include "GL/wglew.h" +#else /* linux/unix/other */ +# if USE_GLES +# include +# else +# if !defined(GL_GLEXT_PROTOTYPES) +# define GL_GLEXT_PROTOTYPES +# endif +# include +# include +# endif +#endif + + +#endif // __PROJECTM_OPENGL_H__ diff --git a/src/sdl-test-ui/pmSDL.hpp b/src/sdl-test-ui/pmSDL.hpp index bd26c249a..6a6be4a55 100644 --- a/src/sdl-test-ui/pmSDL.hpp +++ b/src/sdl-test-ui/pmSDL.hpp @@ -43,12 +43,12 @@ #include #include #include -#include // projectM SDL -#include "setup.hpp" -#include "loopback.hpp" #include "audioCapture.hpp" +#include "loopback.hpp" +#include "opengl.h" +#include "setup.hpp" #if defined _MSC_VER @@ -89,7 +89,11 @@ #ifndef DATADIR_PATH #ifdef DEBUG #define DATADIR_PATH "." +#ifndef _WIN32 #warning "DATADIR_PATH is not defined - falling back to ./" +#else + #pragma warning "DATADIR_PATH is not defined - falling back to ./" +#endif /** _WIN32 */ #else #define DATADIR_PATH "/usr/local/share/projectM" #ifndef _WIN32