.DISABLED-hgeol
author Sam Lantinga <slouken@libsdl.org>
Tue, 02 Apr 2013 07:57:37 -0700
changeset 7045 4be2c24b7de1
parent 5055 2936fc46b015
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 README.android in section "Loading assets") and results in a message like "java.io.FileNotFoundException: 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.
     1 [patterns]
     2 .hgeol = native
     3 .hgignore = native
     4 BUGS = native
     5 CREDITS = native
     6 INSTALL = native
     7 NOTES = native
     8 TODO = native
     9 WhatsNew = native
    10 **COPYING = native
    11 **README = native
    12 **doxyfile = native
    13 **Doxyfile = native
    14 **install-sh = LF
    15 **mkinstalldirs = LF
    16 **Makefile = LF
    17 **Makefile.* = LF
    18 test/automated/rwops/read = LF
    19 **README.* = native
    20 **.S = native
    21 **.bmp = BIN
    22 **.c = native
    23 **.cc = native
    24 **.cpp = native
    25 **.csh = LF
    26 **.dat = BIN
    27 **.gdbinit = LF
    28 build-scripts/config.guess = LF
    29 **.h = native
    30 **.htm = native
    31 **.html = native
    32 **.icns = BIN
    33 **.in = LF
    34 **.java = native
    35 **.m = native
    36 **.m4 = native
    37 **.mk = LF
    38 **.nib = BIN
    39 **.pch = BIN
    40 **.pdf = BIN
    41 **.pl = native
    42 **.plist = native
    43 **.png = BIN
    44 .indent.pro = LF
    45 **.rc = native
    46 **.rtf = BIN
    47 **.sh = LF
    48 **.sln = native
    49 **.txt = native
    50 **.vcp = native
    51 **.vcproj = native
    52 **.vcw = native
    53 **.vcxproj = native
    54 **.wav = BIN
    55 **.xbm = BIN
    56 **.xml = native
    57 **.zip = BIN