src/core/android/SDL_android.cpp
changeset 6816 b3d3ef1e15b5
parent 6806 9e57ff36fd7a
child 6828 ac7f004fb63c
equal deleted inserted replaced
6815:5fefa916e039 6816:b3d3ef1e15b5
   610     mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream), "getFileDescriptor", "()Ljava/io/FileDescriptor;");
   610     mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream), "getFileDescriptor", "()Ljava/io/FileDescriptor;");
   611     fd = mEnv->CallObjectMethod(inputStream, mid);
   611     fd = mEnv->CallObjectMethod(inputStream, mid);
   612     fdCls = mEnv->GetObjectClass(fd);
   612     fdCls = mEnv->GetObjectClass(fd);
   613     descriptor = mEnv->GetFieldID(fdCls, "descriptor", "I");
   613     descriptor = mEnv->GetFieldID(fdCls, "descriptor", "I");
   614     ctx->hidden.androidio.fd = mEnv->GetIntField(fd, descriptor);
   614     ctx->hidden.androidio.fd = mEnv->GetIntField(fd, descriptor);
       
   615 
       
   616     // Seek to the correct offset in the file.
       
   617     lseek(ctx->hidden.androidio.fd, (off_t)ctx->hidden.androidio.offset, SEEK_SET);
   615 
   618 
   616     if (false) {
   619     if (false) {
   617 fallback:
   620 fallback:
   618         __android_log_print(ANDROID_LOG_DEBUG, "SDL", "Falling back to legacy InputStream method for opening file");
   621         __android_log_print(ANDROID_LOG_DEBUG, "SDL", "Falling back to legacy InputStream method for opening file");
   619         /* Try the old method using InputStream */
   622         /* Try the old method using InputStream */