LinkApp now calls its launch method via the delegate mechanism instead of
via an overridden virtual method. This should make it easier to move the
launch method out of LinkApp and into the GMenu2X main class.
This functionality was half-removed already: some code missing, other
essential parts commented out.
I don't see the point of this either: RGB graphics are created for a certain
gamma value; if that differs from the screen gamma it is up to the application
to do something about it: gamma correct the graphics and/or change the screen
gamma. It doesn't make sense to make this user configurable.
Initialize in constructor and clean up in destructor instead of having separate init() and deinit() methods.
Don't close file descriptor if open failed (ts_fd == -1).
Renamed initialized() to available(), since it tests whether the touch screen was found, not whether an initialization was attempted.
Improved code layout and minor other cleanups.
The desired backlight level depends on the amount of light coming in from
the environment, not on the application that is run. Setting the brightness
when launching an application discards what is probably the right value
for this location (indoor/outdoor) and time of day. So we decided that this
is not a desirable feature and therefore removed it.
Instead of having fscanf() read into a string buffer (with the risk of
overflowing it if sysfs returns an unexpectedly long string) and converting
the value to integer with atoi() afterwards, just use fscanf() to read
an integer.
The maximum frequency for applications was set to 430 MHz before,
while some Dingoos can handle higher frequencies. Now the limit is set to
the theoretical maximum frequency of 500 MHz.
For the menu itself the maximum frequency is set to a safer 408 MHz,
to avoid over-eager users from putting their system in an unusable state
that is difficult to recover from.
Also the frequency settings are now done in 24 MHz increments, to match
the limitations of the current JZ4740 kernel. Note that only new entries
are rounded to 24 MHz multiples, existing entries stay as they are.
There was a lot of gp2x-specific code which was built for
all platform. For instance, the code was compiled for all
the platforms with the constant "TARGET_GP2X" defined.
This obviously had to be fixed.