author Sam Lantinga <>
Tue, 02 Apr 2013 07:57:37 -0700
changeset 7045 4be2c24b7de1
parent 6987 7084af936d82
child 7222 2435b221d77d
permissions -rw-r--r--
Fixed bug 1780 - SDL_RWFromFile() sets an error on Android although a valid SDL_RWops pointer is returned.

Philipp Wiesemann

SDL_RWFromFile() sets an error to be queried with SDL_GetError() on Android although a valid SDL_RWops pointer is returned.

This happens if the fallback implemented in SDL_android.cpp is used to load compressed assets (see in section "Loading assets") and results in a message like " This file can not be opened as a file descriptor; it is probably compressed". I think this is confusing and not needed because the loading works as expected.

I attached a patch which changes SDL_android.cpp to not set an error if compressed assets are loaded. In this case also no Exception is queried and no additional string are created.
     2 Please distribute this file with the SDL runtime environment:
     4 The Simple DirectMedia Layer (SDL for short) is a cross-platform library
     5 designed to make it easy to write multi-media software, such as games and
     6 emulators.
     8 The Simple DirectMedia Layer library source code is available from:
    11 This library is distributed under the terms of the zlib license: