ANDROID flag fix to SFML_SYSTEM_ANDROID

This commit is contained in:
Lionel Aimerie (Pixium Digital) 2018-07-22 11:33:20 +08:00 committed by Lukas Dürrenberger
parent f22b9b7b71
commit 2853b6b629
2 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@
#include <cstdio> #include <cstdio>
#include <string> #include <string>
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
namespace sf namespace sf
{ {
namespace priv namespace priv
@ -122,7 +122,7 @@ private:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
priv::ResourceStream* m_file; priv::ResourceStream* m_file;
#else #else
std::FILE* m_file; ///< stdio file stream std::FILE* m_file; ///< stdio file stream

View File

@ -26,7 +26,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/FileInputStream.hpp> #include <SFML/System/FileInputStream.hpp>
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
#include <SFML/System/Android/ResourceStream.hpp> #include <SFML/System/Android/ResourceStream.hpp>
#endif #endif
@ -44,7 +44,7 @@ FileInputStream::FileInputStream()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
FileInputStream::~FileInputStream() FileInputStream::~FileInputStream()
{ {
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
if (m_file) if (m_file)
delete m_file; delete m_file;
#else #else
@ -57,7 +57,7 @@ FileInputStream::~FileInputStream()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool FileInputStream::open(const std::string& filename) bool FileInputStream::open(const std::string& filename)
{ {
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
if (m_file) if (m_file)
delete m_file; delete m_file;
m_file = new priv::ResourceStream(filename); m_file = new priv::ResourceStream(filename);
@ -76,7 +76,7 @@ bool FileInputStream::open(const std::string& filename)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Int64 FileInputStream::read(void* data, Int64 size) Int64 FileInputStream::read(void* data, Int64 size)
{ {
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
return m_file->read(data, size); return m_file->read(data, size);
#else #else
if (m_file) if (m_file)
@ -90,7 +90,7 @@ Int64 FileInputStream::read(void* data, Int64 size)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Int64 FileInputStream::seek(Int64 position) Int64 FileInputStream::seek(Int64 position)
{ {
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
return m_file->seek(position); return m_file->seek(position);
#else #else
if (m_file) if (m_file)
@ -111,7 +111,7 @@ Int64 FileInputStream::seek(Int64 position)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Int64 FileInputStream::tell() Int64 FileInputStream::tell()
{ {
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
return m_file->tell(); return m_file->tell();
#else #else
if (m_file) if (m_file)
@ -125,7 +125,7 @@ Int64 FileInputStream::tell()
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Int64 FileInputStream::getSize() Int64 FileInputStream::getSize()
{ {
#ifdef ANDROID #ifdef SFML_SYSTEM_ANDROID
return m_file->getSize(); return m_file->getSize();
#else #else
if (m_file) if (m_file)