GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2015-Feb-15

Title: Media folder bug
Post by: MrPlow on 2015-Feb-15
Hi

Just as of now my app is building okay once then on close it deletes most items in the media folder?

Anyone else seen this issue?
I luckily have backups in the distribute folders so I didnt need to re-create them

Title: Re: Media folder bug
Post by: MrPlow on 2015-Feb-15
Well I found the culprit

It was this function...it was deleting my media files on test running...

Code (glbasic) Select
FUNCTION Check_AndroidMem: File$
LOCAL Memory=JavaCall$("memory:check")
IF Memory<100
KILLFILE File$
KILLFILE GETCURRENTDIR$()+"/"+File$
KILLFILE GETCURRENTDIR$()+File$
ENDIF
ENDFUNCTION
Title: Re: Media folder bug
Post by: spacefractal on 2015-Feb-15
I'm thinks I'm fixed that for a year or two years ago... And might have reappear.

The function is no longer used from 2.7.x and is done automatic. The function was designed to save internal memory when it's low.

Just add ?IFDEF android to fix it. Sorry for the bug.
Title: Re: Media folder bug
Post by: MrPlow on 2015-Feb-16
No worries - btw - I loved Catchout!

Nice retro feel and colour pallette
Title: Re: Media folder bug
Post by: spacefractal on 2015-Feb-16
but the other way, just remove Check_AndroidMem, since its does automatic in Java now. Any reference to that can been removed too.

Thanks for the comment for Catchout. Was fun to create such a lowres game (more lowres than normal). Kasper did the default colour palette, but you can define that your self in options.