Author Topic: Media folder bug  (Read 1552 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1507
    • View Profile
Media folder bug
« 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

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1507
    • View Profile
Re: Media folder bug
« Reply #1 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
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3645
    • View Profile
    • Space Fractal
Re: Media folder bug
« Reply #2 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.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1507
    • View Profile
Re: Media folder bug
« Reply #3 on: 2015-Feb-16 »
No worries - btw - I loved Catchout!

Nice retro feel and colour pallette
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Online spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3645
    • View Profile
    • Space Fractal
Re: Media folder bug
« Reply #4 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.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.