Revert accidental filesystem conversion

"extension" in this context is not referring to a file extension.
This commit is contained in:
Chris Thrasher 2022-02-18 10:36:25 -07:00 committed by Vittorio Romeo
parent 80004d87b1
commit 106da21dd1
2 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,7 @@ AudioDevice::~AudioDevice()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool AudioDevice::isExtensionSupported(const std::filesystem::path& extension) bool AudioDevice::isExtensionSupported(const std::string& extension)
{ {
// Create a temporary audio device in case none exists yet. // Create a temporary audio device in case none exists yet.
// This device will not be used in this function and merely // This device will not be used in this function and merely
@ -119,10 +119,10 @@ bool AudioDevice::isExtensionSupported(const std::filesystem::path& extension)
if (!audioDevice) if (!audioDevice)
device.emplace(); device.emplace();
if ((extension.string().length() > 2) && (extension.string().substr(0, 3) == "ALC")) if ((extension.length() > 2) && (extension.substr(0, 3) == "ALC"))
return alcIsExtensionPresent(audioDevice, extension.string().c_str()) != AL_FALSE; return alcIsExtensionPresent(audioDevice, extension.c_str()) != AL_FALSE;
else else
return alIsExtensionPresent(extension.string().c_str()) != AL_FALSE; return alIsExtensionPresent(extension.c_str()) != AL_FALSE;
} }

View File

@ -29,7 +29,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Vector3.hpp> #include <SFML/System/Vector3.hpp>
#include <filesystem> #include <string>
namespace sf namespace sf
@ -70,7 +70,7 @@ public:
/// \return True if the extension is supported, false if not /// \return True if the extension is supported, false if not
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static bool isExtensionSupported(const std::filesystem::path& extension); static bool isExtensionSupported(const std::string& extension);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the OpenAL format that matches the given number of channels /// \brief Get the OpenAL format that matches the given number of channels