Rockbox mail archiveSubject: Dynamic global char arrays.
Dynamic global char arrays.
From: XavierGr <xaviergr_at_gmail.com>
Date: Sat, 20 Aug 2005 00:15:18 +0300
Ok I have consumed a lot of time over this and I must say that I have come
to a dead end.
As some of you already to know I am preparing a modified version of the jpeg
viewer which wil enable file scrolling (next/previous).
Though all is going fine and my routines work, I have one problem about the
global char array that holds the filenames.
In order to change pictures I load the contets of current folder (names (not
paths) of jpeg files) to a big char array, that is static global.
My main concern is the length of this array (along with the pointer array
that points the big one).
I can use a very big one (*pointer, buffer) but I think that
this is a waste. Also if someone is crazy enough to put 10000 picures in a
folder then the plug-in would crash.
I thought of using the max_files_in_dir value but this will not work on a
Is there any alternatives? What do you think? Maybe pointers?
Also I would like some suggestions about the buuton handling (thinking of
other targets too).
Currently I change files with joystick up or down (previous -next) when the
picture is in default state. LinusN suggested right - left while rasher said
that a combination of buttons would be better. My opinion is the up-down (or
left-right it is the same) in the default state, and play+up-play+down when
the image is zoomed.
Thanks in advance.
Received on 2005-08-19