Paul Cercueil
dd047010ed
Removed old commented code.
2012-06-14 23:53:19 +02:00
Paul Cercueil
9263c782e7
Drop GP2X platform support.
...
The GP2X build was unused and totally broken.
2012-06-14 23:45:57 +02:00
Paul Cercueil
374371c1d2
Removed unused (and broken) TV-out feature.
2012-06-14 22:53:50 +02:00
Paul Cercueil
bc2b5d51ed
Removed unused function GMenu2X:setGamma()
2012-06-14 20:14:19 +02:00
Paul Cercueil
1080527822
Don't log the console-based apps.
2012-06-14 17:39:59 +02:00
Paul Cercueil
c2576d418b
Read the credits from the "about.txt" file.
...
The credits have also been updated.
2012-04-27 17:42:09 +02:00
Paul Cercueil
d1328d791c
Switch to tty1 for console apps (Dingux build only).
...
Console apps are always launched on tty1. However it can occur that
the console displayed on the framebuffer is another one, so we have
to explicitely activate tty1.
2012-04-18 01:35:46 +02:00
Paul Cercueil
e6ca072c46
Added a "show console" link parameter (Dingux build only).
2012-04-13 19:21:49 +02:00
Paul Cercueil
7687212b4e
Removed the "wrapper" feature.
...
It is up to the system to restart GMenu2X when the application exits.
2012-04-13 18:12:30 +02:00
Maarten ter Huurne
8f57afcf53
Explicitly convert 32-bit integers to 16-bit.
...
GCC 4.7.0 warns that C++11 considers doing this implicitly ill-formed.
2012-04-10 23:01:16 +02:00
Maarten ter Huurne
46f2edbc76
BrowseDialog: Code layout cleanup.
...
No functional changes, except for fetching "topBarHeight" only once.
2012-04-10 22:55:19 +02:00
Maarten ter Huurne
58d6077e5c
Touchscreen: Avoid constructing an SDL_Rect for is-inside tests.
...
Made the SDL_Rect versions of the methods call the plain-int versions
instead of vice versa.
2012-04-10 22:44:56 +02:00
Maarten ter Huurne
b248aaf808
Surface cleanup.
...
Use unsigned ints for width and height, like SDL does.
We're using the SDL typedefs there after all.
Include argument names in header when type name does tell everything.
Use whitespace in argument lists.
2012-04-10 22:33:43 +02:00
Maarten ter Huurne
fd642ffe9a
SettingsDialog: Code layout cleanup.
...
No functional changes, except for fetching "topBarHeight" only once.
2012-04-10 22:09:20 +02:00
Maarten ter Huurne
ed8b0c38ba
Don't overwrite link action provided to constructor.
...
Fixes bug introduced in 57ad81e3df
.
This bug would prevent applications from launching, so it's pretty serious.
I did test before committing, but apparently I didn't test the right binary.
2012-04-10 20:30:36 +02:00
Maarten ter Huurne
92d221a1bd
Fixed GCC warning about initialization order.
2012-04-10 19:28:01 +02:00
Maarten ter Huurne
d2413d8233
Added missing #includes.
...
Fixes compilation with GCC 4.7.0.
2012-03-24 12:00:25 +01:00
Maarten ter Huurne
57ad81e3df
Merged LinkAction class into its base class.
...
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.
2012-03-24 11:57:21 +01:00
Paul Cercueil
2d81b13459
Reinitialize the powersaver timer when a suspend has been detected.
2012-02-02 23:36:26 +01:00
Paul Cercueil
a0b9fc026b
Fix the filename for the user-specified input conf file.
2012-01-23 12:29:58 +01:00
Paul Cercueil
273770dad3
InputManager: prevent unmapped buttons from generating events.
2012-01-22 21:49:52 +01:00
Maarten ter Huurne
0043ea5909
Made LinkApp::launch() private.
...
It was already never called outside the class.
2011-12-23 15:51:54 +01:00
Maarten ter Huurne
4ae4fc675e
Mark Link::run() as pure virtual.
...
This is better than providing an empty default implementation, since it
forces subclasses to override the method.
2011-12-23 15:49:09 +01:00
Maarten ter Huurne
d90ed635be
Removed per-app gamma setting.
...
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.
2011-12-23 15:39:53 +01:00
Maarten ter Huurne
0622c4227f
Removed ability to configure custom working directory.
...
Working directory was only configurable in the ini files, not in the GUI.
Many GP2X/Dingoo applications break if the working directory is changed
because they use relative paths for locating their data files.
I don't see a reason to keep this feature, since I don't know of a realistic
scenario where it would be useful. In any case, the functionality can be
re-created by using a wrapper script to change the working directory based on
a parameter value.
2011-12-23 15:20:28 +01:00
Maarten ter Huurne
c2afbfdc91
Made two fields that are only used on GP2X available only on that platform.
...
It seems the "#endif" was inserted at the wrong spot.
2011-12-23 14:07:06 +01:00
Maarten ter Huurne
1ad6b2f25a
Made GMenu2X::ts private.
...
Pass Touchscreen reference to constructors instead of pulling it from
the GMenu2X class.
2011-12-23 14:03:05 +01:00
Maarten ter Huurne
944ab86f9c
Cleanup of touch screen code.
...
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.
2011-12-23 12:30:15 +01:00
Ayla
c7af4b1aea
Removed per-application volume setting.
...
The volume should not depend of the application which is in use.
2011-11-19 14:47:55 +01:00
Xiangfu Liu
5d6dcfb2bf
update nanonote backlight to new driver
2011-11-10 15:05:37 +08:00
Xiangfu Liu
1cd60895d5
use the contrast for brightness in nanonote
2011-11-10 14:59:45 +08:00
Maarten ter Huurne
cf8ebbca5e
gmenu2x.cpp: Re-ordered includes.
...
Put our own header includes before system includes, to avoid masking missing
system includes in our own headers.
2011-10-23 17:32:46 +02:00
Maarten ter Huurne
f28e4f6d89
Minimized gmenu2x.h.
...
Everything that does not need to be shared was moved to gmenu2x.cpp.
2011-10-23 17:27:29 +02:00
Maarten ter Huurne
aea1c44020
utilities: Replace min/max functions by the versions from STL.
2011-10-23 17:00:23 +02:00
Maarten ter Huurne
40c510a28a
utilities: Removed unused functions.
2011-10-23 16:51:59 +02:00
Maarten ter Huurne
a01d892eb6
More header cleanups.
...
This time the focus was on removing namespace imports from headers.
2011-10-23 16:43:56 +02:00
Maarten ter Huurne
e0e7e87ebc
Massive header cleanup.
...
The main goal is to avoid including "gmenu2x.h" from headers.
But I did various other cleanups as well while I was at it.
2011-10-23 16:13:02 +02:00
Maarten ter Huurne
33e7f1ef56
cpu: Include header instead of repeating function declaration.
2011-10-23 15:24:35 +02:00
Maarten ter Huurne
14bae043c0
LinkApp: various cleanups.
...
Log a warning message if setsid() fails.
Also improved code layout.
2011-10-23 13:03:11 +02:00
Maarten ter Huurne
40fcd5137e
InputDialog: header cleanup.
2011-10-23 12:46:52 +02:00
Maarten ter Huurne
cfd294b9ae
IconButton: header cleanup.
2011-10-23 12:37:39 +02:00
Maarten ter Huurne
62facf4dc7
IconButton: removed unused functionality.
...
Labels were always right-aligned: this was the default and no other alignment
was ever selected.
Also removed unused getter and setter methods.
2011-10-23 12:30:20 +02:00
Maarten ter Huurne
abe9130de9
IconButton: fixed up-to-date check in setPosition().
...
Recalculate size if either x or y changed, not necessarily both of them.
2011-10-23 12:06:59 +02:00
Maarten ter Huurne
76613d1810
IconButton: removed unused local variable.
2011-10-23 12:05:27 +02:00
Maarten ter Huurne
55cabcea49
InputDialog: do not return anything from drawVirtualKeyboard().
...
The returned value (action) was ignored, so don't bother returning it.
2011-10-23 12:00:46 +02:00
Maarten ter Huurne
fa5a9816db
InputDialog: re-layouted code.
...
No functional changes.
2011-10-23 11:57:50 +02:00
Maarten ter Huurne
0b878c1b77
SettingsDialog: removed unused action variable and macros.
2011-10-23 11:41:44 +02:00
Maarten ter Huurne
9e876a6f90
MessageBox: header cleanups.
2011-10-23 11:32:16 +02:00
Maarten ter Huurne
3252c777c3
MessageBox: Use arrays instead of vectors for buttons.
...
There is no need for the overhead of std::vector if we know the number
of elements at compile time.
This shaves off about 2 kB of the stripped binary size.
2011-10-23 11:24:20 +02:00
Maarten ter Huurne
28f6cd2122
InputManager: removed "clear" and "manual" logical buttons.
...
These are not used in the GUI anymore.
2011-10-23 11:12:34 +02:00
Maarten ter Huurne
a685b436ec
InputManager: improved config file parsing.
...
Do not test whether config file exists; just open it and handle failure.
Config file was not closed on errors, fixed now.
Make sure unconfigured entries of the button map are properly initialized.
Ignore lines with invalid keywords instead of aborting parsing.
Made log messages more specific.
2011-10-23 10:46:26 +02:00
Maarten ter Huurne
9548aa0a41
InputManager: Don't break if joystick support is disabled in SDL.
...
Early Dingux versions had joystick support disabled, but many programs
broke on that, so booboo enabled joystick support later.
2011-10-23 10:35:33 +02:00
Maarten ter Huurne
433be5daf7
InputManager: have "joystick" as a member instead of a global.
2011-10-23 09:59:22 +02:00
Maarten ter Huurne
641c989934
MenuSettingBool: Support toggling of boolean settings using left/right.
2011-10-23 09:47:51 +02:00
Maarten ter Huurne
a38c283e17
SettingsDialog: simplify code using InputManager::waitForPressedButton().
...
Replaced MenuSetting::manageInput() by handleButtonPress(), because we will
only pass pressed buttons to it, not the entire input event.
2011-10-23 09:38:59 +02:00
Maarten ter Huurne
40fd35d764
MessageBox: minor cleanup.
...
Declare local variables where they are used, not way in advance.
2011-10-23 09:24:42 +02:00
Maarten ter Huurne
ccf55e5d61
BrowseDialog: simplify code using InputManager::waitForPressedButton().
2011-10-23 09:11:06 +02:00
Maarten ter Huurne
315bf0a180
InputManager: C++-style type definitions.
...
There is no need to typedef enums and structs in C++.
Put types defined by InputManager inside the class namespace.
Changed type names to CamelCase.
2011-10-23 09:04:12 +02:00
Maarten ter Huurne
c6db9ff21b
InputManager: reduce namespace pollution.
...
Moved dependency on SDL to implementation file.
Don't import std namespace in header.
If we need std::string, import <string>, not something else.
2011-10-23 08:15:23 +02:00
Maarten ter Huurne
ba6003606e
Include SDL header as <SDL.h> instead of <SDL/SDL.h>.
...
SDL headers are located using "sdl-config --cflags", which outputs
the actual directory that the headers are in, not its parent.
2011-10-23 07:54:10 +02:00
Maarten ter Huurne
f9696971ad
InputManager: re-layouted code.
...
I don't really care for tabs vs spaces, but it's impractical to use tabs
in one source file and spaces in another.
2011-10-23 07:51:41 +02:00
Maarten ter Huurne
0cb1645c03
InputManager: SDL_NumJoysticks is a function, try calling it.
2011-10-23 07:22:55 +02:00
Maarten ter Huurne
ae685a9729
PowerSaver: re-layouted code.
...
No functional changes.
2011-10-23 07:05:54 +02:00
Maarten ter Huurne
e73a8d06ea
Removed per-application brightness setting.
...
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.
2011-09-23 01:51:53 +02:00
Maarten ter Huurne
7a978222b8
Use existing brightness value instead of overriding it.
2011-09-23 01:36:56 +02:00
Maarten ter Huurne
84ec66c7ce
Minor cleanup: better usage of fscanf.
...
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.
2011-09-23 01:23:53 +02:00
Maarten ter Huurne
799bb13f0f
Minor cleanup: group handle init code together.
2011-09-23 01:01:57 +02:00
Maarten ter Huurne
0acbd35fb4
Corrected name of USB power supply device.
...
As far as I can see in the 3.0 kernel sources, both the Dingoo and
the NanoNote use "usb" in lower case.
2011-09-23 00:57:27 +02:00
Maarten ter Huurne
53a73cabc7
Call deinit() method on exit.
...
This prevents file descriptors to sysfs files from staying open as the
selected application is executed.
2011-09-23 00:48:13 +02:00
Maarten ter Huurne
b997485859
Backlight: use different sysfs name for NanoNote and Dingoo.
...
Fixes backlight control on Dingoo.
2011-09-23 00:38:43 +02:00
Maarten ter Huurne
6729e30acb
Fixed mistake in 8bcd03962f
.
...
"iclock" is not a local variable: it is a field, so it should be updated.
2011-09-19 16:49:30 +02:00
Maarten ter Huurne
03ea679a1d
Corrected capitalization of megahertz.
...
"Mhz" -> "MHz"
2011-09-19 16:33:19 +02:00
Maarten ter Huurne
8bcd03962f
Do not constrain the max CPU frequency for apps on setting the string value.
...
It is already constrained on editing and when actually applying the frequency.
The string value constrain is problematic because it happens in a class that
has no knowledge of the actual CPU limits, so it can only contrain to
hardcoded limits.
With this change you'll actually be able to run apps at 432 MHz.
2011-09-19 16:27:53 +02:00
Maarten ter Huurne
8d04cf1064
Removed one last occurrence of hardcoded minimum CPU frequency.
...
Well, I hope it was really the last one now.
2011-09-19 16:26:42 +02:00
Maarten ter Huurne
a014a331f4
Put platform specific defaults in systemwide gmenu2x.conf.
...
It is simpler to maintain them there instead of in the code.
2011-09-19 01:12:34 +02:00
Maarten ter Huurne
19064b4c4a
Work around lack of vsynced page flipping in OpenDingux kernel.
2011-09-18 21:16:12 +02:00
Maarten ter Huurne
41650aaad7
Use 16 bpp by default on the Dingoo.
...
Other platforms keep using 32 bpp.
2011-09-18 18:42:53 +02:00
Maarten ter Huurne
d354eb85a4
Improved CPU frequency control.
...
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.
2011-09-18 18:27:03 +02:00
Ayla
3995133fa5
When deleting a link, check if the icon is used elsewhere before unloading it.
2011-09-18 13:22:02 +02:00
Ayla
cf8bd84362
Added debug message which is displayed when surfaces are deleted from memory.
2011-09-18 13:21:03 +02:00
Ayla
cca367745b
Dingux port: The SD card root is now hardcoded to /boot for the getDiskFree() function only.
...
That function was not working as CARD_ROOT does not necessarily point to the mount point of a filesystem.
2011-09-18 12:42:08 +02:00
Ayla
759eefd676
The files "a.png" and "b.png" have been renamed to "cancel.png" and "accept.png".
2011-09-18 03:40:33 +02:00
Ayla
16b050be05
Modified the key shortcuts for the small popups (deleting a link...).
2011-09-18 03:33:10 +02:00
Ayla
826d622285
Modified the key shortcuts for the generic file/dir selector class.
2011-09-18 03:23:47 +02:00
Ayla
38cfd321f6
Modified the key shortcuts for the wallpaper dialog.
2011-09-18 03:16:08 +02:00
Ayla
d0cfe7c60d
Modified the key shortcuts for the text display dialog.
2011-09-18 03:05:25 +02:00
Ayla
5dd6d31b25
Modified the key shortcuts of the file input dialog.
2011-09-18 02:21:04 +02:00
Ayla
b5131c1db9
Modified the key shortcuts of the text input dialog, so that the X and Y keys are not used.
2011-09-18 02:05:15 +02:00
Ayla
87106cdf56
Modified the button icons displayed when modifying an integer parameter.
2011-09-18 01:47:29 +02:00
Ayla
1aac93f36d
The (gp2x) A button is now used instead of X to clear string inputs (like link names).
2011-09-18 01:40:23 +02:00
Ayla
c9a51af4a6
The WallpaperDialog object now uses a ButtonBox to print the key mapping at the bottom of the screen.
2011-09-18 01:34:19 +02:00
Ayla
d82e262662
Rewrite of the MenuSettingRGBA class so that it won't use the CLEAR/MENU buttons.
2011-09-18 01:33:11 +02:00
Ayla
7f2c7db8e2
Rewrite of how the events are handled by the menusetting* objects.
2011-09-15 20:20:35 +02:00
Ayla
fdee206d93
The ButtonBox now features a clear() function which empties the list of buttons.
2011-09-15 20:12:02 +02:00
Ayla
6ac012348d
Disactivate the binding of the app's manual on the 'Y' button.
2011-09-15 11:33:46 +02:00
Ayla
5f69930d07
The contextual menu now features a "show manual" entry.
2011-09-15 11:18:07 +02:00
Ayla
03a26a859b
Dingoo port: The help menu now displays help for dingoo's controls.
2011-09-04 03:02:17 +02:00
Ayla
9768a74d07
The conf file does not need to be saved on exit.
2011-09-04 02:37:10 +02:00
Xiangfu Liu
46d680990a
gmenu2x wallpaper only support .png
2011-08-22 15:13:44 +08:00
Ayla
8c1f4abb5b
The input manager should check whether a powersaver instance is running, to not create one when it's not needed.
2011-08-17 00:46:43 +02:00