SFML community forums

Help => General => Topic started by: CytraL on June 09, 2015, 06:32:53 am

Title: [Android] LoadFromFile (Not apk/internal asset)
Post by: CytraL on June 09, 2015, 06:32:53 am
I see that Android ResourceStream implementation only works with Internal Assets... perhaps is best uses "FILE" against "Asset" and use "funopen" for get FILE handle... and try first to get a internal assets if it can't... try with 'normal' resource... or something like that :\

Or.. exists any method for load "external" assets??!?!!

*** In 2.3 i get a crash when try load a file that doesn't exists.
Code: [Select]
sf::Texture texture;
texture.loadFromFile("ssss");  <-- CRASH!


How i can help with Android branch?

Grettings!
Title: Re: [Android] LoadFromFile (Not apk/internal asset)
Post by: Mario on June 10, 2015, 10:25:34 am
External loading doesn't exist yet due to there being no real "interface" for it so far.

However, you should be able to do it just by creating your own sf::Stream object and using sf::Texture::loadFromStream.

To help/contribute: just create your own fork on GitHub, implement your changes, create a pull request for review (or a topic on the forums first if you're not sure about whether that's something wanted).