Maarten ter Huurne
52f4686e4a
Surface: Load image with factory method instead of constructor.
...
If loading fails, the factory method returns NULL, while previously the
constructor would create a Surface object with a NULL "raw" field.
However, since most of the methods dereference "raw" without checking,
such a Surface would likely crash the application when used.
2011-06-02 22:09:03 +02:00
Maarten ter Huurne
0a9229ff3f
Surface: Use the destructor as intended.
...
There is no reason to have an explicit free() method instead of just
destructing the Surface object and doing cleanup in the destructor.
2011-06-02 18:15:15 +02:00
Maarten ter Huurne
7dac306c16
Surface: Removed fake double buffering.
...
Use real double buffering instead.
I checked the SDL code and if the hardware cannot provide double buffering
it will use a shadow surface to ensure that a frame is not displayed until
it has been fully painted.
Also disable mouse cursor before opening the output surface. The reason it
was disabled after the surface was opened is that SDL on GP2X has a bug.
However, this means the cursor is visible for a short time during startup
which looks ugly.
2011-06-02 17:59:26 +02:00
Maarten ter Huurne
5b6d922f11
Fixed bug: wallpaper does not use alpha channel.
...
The unnecessary alpha channel might harm performance but is not a big deal.
However, the fact that the alpha flag (bool) is somehow automatically
converted by C++ into a skin name (string) causes the entire screen to
stay black.
The black screen was fixed by removing the alpha flag.
For optimum blitting performance, the wallpaper surface is then converted
to the pixel format of the frame buffer.
Bug was introduced in 52c89d6005
.
2011-06-02 07:13:59 +02:00
Sergey Kukunin
240286df11
Add powersaver class
2011-06-02 06:32:39 +03:00
Maarten ter Huurne
e4b71138b9
ASFont: removed precalculation of half heights.
...
There is no point in precalculating something so cheap to recalculate.
Also, the majority of uses was to compensate for passing the wrong alignment argument.
2011-05-10 00:31:45 +02:00
Maarten ter Huurne
ec5d426d83
ASFont: moved SFontPlus code into ASFont source files.
...
This is in preparation of merging the classes.
2011-05-09 14:25:16 +02:00
Maarten ter Huurne
a35a7e2c35
Introduced enums for text alignment in the ASFont class.
2011-05-09 05:17:25 +02:00
Ayla
ba9fef5c42
The locale configuration will now be saved.
2011-04-12 13:24:35 +02:00
Xiangfu Liu
be9c6b9220
update the brightness file path to NanoNote
...
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2010-11-17 17:26:34 +08:00
Ayla
69c702f88c
When adding a new link, the default brightness is now -1.
...
Note that the brightness values between -1 and 5 won't be accepted, and will be set back to 5.
2010-10-13 22:15:55 +02:00
Ayla
563cb34a89
Rewrote the whole input system.
...
Gmenu2X will no longer eat 100% CPU ;)
2010-09-17 22:34:26 +02:00
Ayla
c6c3dfe8e0
Added some signal handlers, so that gmenu2x will exit correctly if a TERM signal occurs or after a segfault.
2010-09-17 22:32:41 +02:00
Ayla
7c9364780b
Replaced every message output by calls to the log macros.
2010-09-17 22:31:09 +02:00
bartbes
5c05348ba9
Automatically switches CARD_ROOT to / when CARD_ROOT doesn't exist
2010-09-01 22:50:43 +02:00
bartbes
cf9628a4cc
More fixed for when CARD_ROOT doesn't exist
2010-09-01 22:11:24 +02:00
bartbes
6381674f57
Fixed segfault when CARD_ROOT didn't exist & added _CARD_ROOT
...
compile-time define to set CARD_ROOT
Note that you shouldn't set CARD_ROOT (or _CARD_ROOT) to /, because that
might mess things up.
2010-09-01 17:37:27 +02:00
bartbes
e9941dc4fd
Now only allows file browsing up to /, CARD_ROOT is /card/
2010-08-03 17:49:34 +02:00
bartbes
ba9af53c21
Changed the file browser to use / as root and added ability to see extensionless files (i.e. executables)
2010-08-03 17:32:54 +02:00
Maarten ter Huurne
b54a595e26
Improved conversion from color enum to string and vice versa.
...
The stringToColor() and colorToString() methods were changed into file-scope functions, so they can be inlined by the compiler.
The colorNames array is now used for lookups in both directions, removing duplication of the color names.
The missing "selectionBg" entry was added to the colorNames array.
2010-07-28 16:15:52 +02:00
Maarten ter Huurne
4ddc189847
Use tr1::unordered_map instead of google::dense_hash_map in class GMenu2X.
...
This reduces the binary size by about 260K.
2010-07-28 03:31:41 +02:00
Maarten ter Huurne
0ce743426a
Give SettingsDialog a direct reference to the Touchscreen and InputManager objects instead of fetching them from the GMenu2X object.
2010-07-27 23:09:16 +02:00
Maarten ter Huurne
d03dbea9bd
Give InputDialog a direct reference to the Touchscreen and InputManager objects instead of fetching them from the GMenu2X object.
2010-07-27 22:56:03 +02:00
Maarten ter Huurne
8032d96a17
Converted public fields of FileLister to private.
2010-07-27 21:41:35 +02:00
Maarten ter Huurne
0cd6b8264c
Converted public fields of LinkApp to private.
...
Although exposing a read/write reference to a private field is not much better than having a public field.
Well, at least we are explicit about the nasty stuff now.
2010-07-27 21:26:02 +02:00
Maarten ter Huurne
8a9aac028b
Converted public fields of Menu to private.
2010-07-27 21:12:15 +02:00
Maarten ter Huurne
8f98a4b135
Converted public fields of MessageBox to private.
2010-07-27 20:59:28 +02:00
Maarten ter Huurne
40ead3b642
Converted public fields of InputDialog to private.
2010-07-26 05:58:06 +02:00
Maarten ter Huurne
b78ffa704a
Converted public fields of Touchscreen to private.
2010-07-26 05:45:56 +02:00
Maarten ter Huurne
767c131b1d
Adapted backlight setting to new kernel interface.
...
Updated path to use /sys instead of /proc/jz.
Avoid leading zeroes, since sysfs interprets those as octal numbers.
2010-07-12 02:03:50 +02:00
Maarten ter Huurne
28a041ea80
Add constant for SD card root.
...
In the future, this should be part of a device abstraction, but having a single constant is an improvement over having duplicated string literals.
2010-07-04 03:19:52 +02:00
Maarten ter Huurne
7fb67ba1cc
Set CPU frequency through sysfs.
...
No more poking into registers via /dev/mem.
If there is no cpufreq support in the kernel, when trying to change the frequency a message will be printed on stderr that the required sysfs file cannot be opened.
2010-07-04 03:04:42 +02:00
Ulrich Hecht
ac2fa73962
don't waste CPU redrawing the screen when there's no input
...
Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
2010-06-20 18:36:42 +02:00
Maarten ter Huurne
c52b239bc0
Fixed intendation.
2010-06-19 05:10:19 +02:00
Maarten ter Huurne
3efa602af0
Do not run the main loop inside the GMenu2X constructor, but in a method.
2010-06-19 03:50:23 +02:00
Maarten ter Huurne
9f05aaf6b9
Fixed most warnings.
2010-06-19 03:15:20 +02:00
Maarten ter Huurne
988439605d
Fixed display of card size and free space for numbers over 4 GB.
...
The result was stored in a 64-bit integer, but the computation was done in 32 bits...
2010-06-18 03:16:44 +02:00
Maarten ter Huurne
d3b094e1b5
Removed spaces at end of lines in source files.
...
No actual content was changed in this commit.
2010-06-18 03:12:58 +02:00
Lars-Peter Clausen
6da573f303
Move methods only used by dialogs from the GMenu2x class to a common base class
...
for all dialog classes.
2010-05-05 14:35:52 +02:00
Lars-Peter Clausen
09999edc27
Initalize buffer.
2010-05-03 23:56:15 +02:00
Lars-Peter Clausen
3b2538cfaf
Add ButtonBox widget to simplify managing buttons in the bottombar. Also fixes some memleaks where buttons were left unfreed.
2010-05-03 22:21:36 +02:00
Lars-Peter Clausen
8b862b8398
Unify filedialog and browsedialog code
2010-05-03 19:58:28 +02:00
Lars-Peter Clausen
431e88e021
Use "/card" instead of "/card/gmenu2x" for disk stats
2010-05-03 14:21:00 +02:00
Lars-Peter Clausen
475fdb74b9
Fix topbar icon rects
2010-05-02 20:17:27 +02:00
Lars-Peter Clausen
7fd1ab032a
Use a simple array instead of a hashmap for the colors.
2010-05-02 19:53:06 +02:00
Lars-Peter Clausen
40a26e1a9c
pass strings by reference where possible
2010-05-02 14:38:16 +02:00
Lars-Peter Clausen
667fb05a35
Kill float and double
2010-05-01 13:20:47 +02:00
Lars-Peter Clausen
8a87e8e1ab
Don't do this. It's pure evil.
2010-05-01 12:58:24 +02:00
Mirko Lindner
745321edf9
remove debug output
...
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-22 10:22:36 +01:00
Mirko Lindner
a1eb23eec1
set correct directory for disk check
...
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-15 00:03:31 +01:00