Android: Restored old file reading behavior for audio stuff

This commit is contained in:
Mario Liebisch 2015-01-30 10:26:12 +01:00
parent 62933114ec
commit 3424467896
2 changed files with 70 additions and 0 deletions

View file

@ -33,6 +33,16 @@
#include <SFML/System/Export.hpp>
#include <fstream>
#ifdef ANDROID
namespace sf
{
namespace priv
{
class SFML_SYSTEM_API ResourceStream;
}
}
#endif
namespace sf
{
@ -43,6 +53,17 @@ namespace sf
class SFML_SYSTEM_API FileInputStream : public InputStream
{
public :
////////////////////////////////////////////////////////////
/// \brief Default constructor
///
////////////////////////////////////////////////////////////
FileInputStream();
////////////////////////////////////////////////////////////
/// \brief Default destructor
///
////////////////////////////////////////////////////////////
virtual ~FileInputStream();
////////////////////////////////////////////////////////////
/// \brief Open the stream from a file path
@ -99,7 +120,11 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
#ifndef ANDROID
std::ifstream m_file; ///< Standard file stream
#else
sf::priv::ResourceStream *m_file;
#endif
};
} // namespace sf