.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.
icculus@5054
     1
[patterns]
icculus@5054
     2
.hgeol = native
icculus@5054
     3
.hgignore = native
icculus@5054
     4
BUGS = native
icculus@5054
     5
CREDITS = native
icculus@5054
     6
INSTALL = native
icculus@5054
     7
NOTES = native
icculus@5054
     8
TODO = native
icculus@5054
     9
WhatsNew = native
icculus@5054
    10
**COPYING = native
icculus@5054
    11
**README = native
icculus@5054
    12
**doxyfile = native
icculus@5054
    13
**Doxyfile = native
icculus@5054
    14
**install-sh = LF
icculus@5054
    15
**mkinstalldirs = LF
icculus@5054
    16
**Makefile = LF
icculus@5054
    17
**Makefile.* = LF
icculus@5054
    18
test/automated/rwops/read = LF
icculus@5054
    19
**README.* = native
icculus@5054
    20
**.S = native
icculus@5054
    21
**.bmp = BIN
icculus@5054
    22
**.c = native
icculus@5054
    23
**.cc = native
icculus@5054
    24
**.cpp = native
icculus@5054
    25
**.csh = LF
icculus@5054
    26
**.dat = BIN
icculus@5054
    27
**.gdbinit = LF
icculus@5054
    28
build-scripts/config.guess = LF
icculus@5054
    29
**.h = native
icculus@5054
    30
**.htm = native
icculus@5054
    31
**.html = native
icculus@5054
    32
**.icns = BIN
icculus@5054
    33
**.in = LF
icculus@5054
    34
**.java = native
icculus@5054
    35
**.m = native
icculus@5054
    36
**.m4 = native
icculus@5054
    37
**.mk = LF
icculus@5054
    38
**.nib = BIN
icculus@5054
    39
**.pch = BIN
icculus@5054
    40
**.pdf = BIN
icculus@5054
    41
**.pl = native
icculus@5054
    42
**.plist = native
icculus@5054
    43
**.png = BIN
icculus@5054
    44
.indent.pro = LF
icculus@5054
    45
**.rc = native
icculus@5054
    46
**.rtf = BIN
icculus@5054
    47
**.sh = LF
icculus@5054
    48
**.sln = native
icculus@5054
    49
**.txt = native
icculus@5054
    50
**.vcp = native
icculus@5054
    51
**.vcproj = native
icculus@5054
    52
**.vcw = native
icculus@5054
    53
**.vcxproj = native
icculus@5054
    54
**.wav = BIN
icculus@5054
    55
**.xbm = BIN
icculus@5054
    56
**.xml = native
icculus@5054
    57
**.zip = BIN