Files
projectm/src/libprojectM/PresetFactory.cpp
milkdropper c5533e3efe Little things (#368)
* Noise not needed - F4 shows if shaders are compiled.

* Don't compile native presets by default in Visual Studio

* Debug / duplicate info

* Missed a debug native preset.

* Make texture errors more clear - we failed looking for multiple extensions.

* Move images from presets folder to textures folder

* Documented missing textures.

* Undo Visual Studio version bump.

* Renable NativePresetFactory (but the example native presets remain disabled)

* Comment

* Fixes / updates to audio device toggling.

* Stop crashing if there is no input microphone. Make fake audio dynamic so it can be enabled if there is no mic.

* Remove debug output.

* Document VC++ redist requirement.

* F4 missing from SDL help menu.

* Windows app instead of Console (no more cmd.exe pop-up when launching).

* Fullscreen for built-in settings.

* New icon (based on github and idle preset and consistent with Steam)

* Change language for loopback / audio changing.

* default fullscreen for built-in settings.

* Revert "Fullscreen for built-in settings."

This reverts commit b1936e76ab.

* Revert "default fullscreen for built-in settings."

This reverts commit ea89584174.

* Revert "9a9151b9"

* 9a9151b9

* fake_audio to fakeAudio
2020-07-28 22:05:35 +03:00

27 lines
830 B
C++

#include "PresetFactory.hpp"
const std::string PresetFactory::IDLE_PRESET_PROTOCOL("idle");
std::string PresetFactory::protocol(const std::string & url, std::string & path) {
#ifdef __APPLE__
// NOTE: Brian changed this from url.find_first_of to url.find, since presumably we want to find the first occurence of
// :// and not the first occurence of any colon or forward slash. At least that fixed a bug in the Mac OS X build.
std::size_t pos = url.find("://");
#else
std::size_t pos = url.find_first_of("://");
#endif
if (pos == std::string::npos)
return std::string();
else {
path = url.substr(pos + 3, url.length());
// std::cout << "[PresetFactory] path is " << path << std::endl;
#ifdef DEBUG
std::cout << "[PresetFactory] url is " << url << std::endl;
#endif
return url.substr(0, pos);
}
}