Emscripten seems to work, should also fix PSP and Qt builds

This commit is contained in:
xawotihs
2016-06-19 00:41:35 +02:00
parent 1667b79fa8
commit e4e809f3fe
7 changed files with 38 additions and 24 deletions
+7 -1
View File
@@ -113,23 +113,29 @@ public:
unsigned long fileSize();
#if (defined QT_CONFIG) && (!defined USE_PHONON)
QMediaPlayer* effect;
void* mSample;
#elif defined (PSP)
WAVDATA* mSample;
#elif defined (IOS)
std::string filename;
std::string key;
std::string ext;
void* mSample;
#elif defined (WITH_FMOD)
FSOUND_SAMPLE *mSample;
#elif defined (USE_PHONON)
Phonon::AudioOutput* mOutput;
Phonon::MediaObject* mMediaObject;
void* mSample;
#elif defined ANDROID
SLObjectItf playerObject;
SLPlayItf playInterface;
SLVolumeItf sampleVolumeInterface;
void* mSample;
#elif (defined WIN32)
std::string filename;
#endif
void* mSample;
#endif
};
+1 -1
View File
@@ -139,7 +139,7 @@ void DownloadRequest::fileDownloaded()
// let's check some error
if(mNetworkReply->error() != QNetworkReply::NoError) {
processError(NetworkReply->error(), mNetworkReply->errorString().toStdString());
processError(mNetworkReply->error(), mNetworkReply->errorString().toStdString());
break;
}
+5
View File
@@ -124,6 +124,10 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
userPath = [[documentsDirectory stringByAppendingString: @"/User/"] cStringUsingEncoding:1];
systemPath = [[documentsDirectory stringByAppendingString: @"/Res/"] cStringUsingEncoding:1];
#elif defined (__EMSCRIPTEN__)
systemPath = "/";
DebugTrace("User path " << userPath);
DebugTrace("System path " << systemPath);
#elif defined (ANDROID)
userPath = JGE::GetInstance()->getFileSystemLocation();
systemPath = "";
@@ -296,6 +300,7 @@ void JFileSystem::DetachZipFile()
bool JFileSystem::openForRead(izfstream & File, const string & FilePath) {
DebugTrace("JFileSystem::openForRead " << FilePath);
File.open(FilePath.c_str(), mUserFS);
if (File)
return true;
+2
View File
@@ -2322,6 +2322,8 @@ void JRenderer::TransferTextureToGLContext(JTexture& inTexture)
// Pay attention when doing texture mapping!!!
glBindTexture(GL_TEXTURE_2D, mCurrentTex); // Bind To The Texture ID
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
/* NOT USED
if (mode == TEX_TYPE_MIPMAP) // generate mipmaps