summaryrefslogtreecommitdiffstats
path: root/uisimulator/common
AgeCommit message (Collapse)AuthorFilesLines
2011-10-30Fix simulator brightness calculation in case MIN_BRIGHTNESS_SETTING != 1Bertrik Sikken1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30870 a1c6a512-1295-4272-9138-f99709370657
2011-10-04r30706 was not the right fix - thanks to amiconn for catching the errorMichael Chicoine1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30707 a1c6a512-1295-4272-9138-f99709370657
2011-10-03Fix w32 cross-compiled sim showing 0KB for disk size and disk freeMichael Chicoine1-2/+2
in System -> Rockbox Info git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30706 a1c6a512-1295-4272-9138-f99709370657
2011-09-03Fix warning, 'read_next:' is only used when EOVERFLOW is defined.Andree Buschmann1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30414 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Dircache: Don't expose struct dircache_entry and pointers into the cache, ↵Thomas Martitz1-4/+3
use IDs instead. Only integer IDs are exposed from dircache with this. This way the cache is isolated from other modules. This is needed for my buflib gsoc project. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30038 a1c6a512-1295-4272-9138-f99709370657
2011-06-12Work around missing EOVERFLOW define on cygwin/mingw.Thomas Jarosch1-0/+2
According to the mighty google, stat() will just return an incorrect file size for files > 2 GB on cygwin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29995 a1c6a512-1295-4272-9138-f99709370657
2011-06-10RaaA / sim: Don't abort directory read if we encounter files larger than 2 ↵Thomas Jarosch1-1/+15
GB in a directory git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29992 a1c6a512-1295-4272-9138-f99709370657
2011-04-16Fix regression in r29715: files listed multiple times in uisimulatorMichael Hohmuth1-2/+4
Fixes FS#12066. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29717 a1c6a512-1295-4272-9138-f99709370657
2011-04-15Better dircache handling in simulatorMichael Hohmuth1-3/+16
Actually add files to the dircache (as well as removing them) and remove them only when they were found on disk. This matches the native behavior and prevents the dircache from becoming uninitialized when a previously created or nonexisting file is being removed. This typically would happen during a database update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29715 a1c6a512-1295-4272-9138-f99709370657
2011-03-08RaaA: Add RTC supportThomas Jarosch1-18/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29544 a1c6a512-1295-4272-9138-f99709370657
2011-03-08Bring idle poweroff to RaaA and the simThomas Jarosch1-9/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29543 a1c6a512-1295-4272-9138-f99709370657
2011-03-01Expose sys_poweroff() and cancel_shutdown() to RaaA. Hopefully fixes android ↵Thomas Jarosch1-4/+0
build git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29485 a1c6a512-1295-4272-9138-f99709370657
2011-02-28Move sleep timer code outside of PLATFORM_NATIVE ifdef so RaaA can access itThomas Jarosch1-11/+0
Also remove redundant RaaA stubs for it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29467 a1c6a512-1295-4272-9138-f99709370657
2011-02-28Hopefully get shutdown/exit handling on SDL/maemo right.Thomas Martitz1-10/+0
Make shutdown_hw() not return as it's supposed to, ensure sim_do_exit() is called from main thread and move sim_kernel_shutdown() into it to simplify things. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29455 a1c6a512-1295-4272-9138-f99709370657
2011-02-18Implement cooperative threads on hosted platforms using C code.Thomas Martitz1-2/+5
This replaces SDL threads with real cooperative threads, which are less cpu intensive and allow priority scheduling. The backend for context switching is dependant on the host (sigaltstack/longjmp on Unix, Fibers on Windows). configure has options to force or disallow SDL threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29327 a1c6a512-1295-4272-9138-f99709370657
2011-02-15Fix the shutdown sequence for maemo, SDL and simulator buildsThomas Jarosch1-0/+6
Do proper shutdown in RaaA builds like writeout of last.FM scrobbler file and other neat things. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29309 a1c6a512-1295-4272-9138-f99709370657
2011-02-08Initial maemo platform supportThomas Jarosch1-0/+2
Adds Nokia N900, N810 and N800 support. Features: - Introduce maemo specific platform defines - Play audio in silent mode - Stop playback on incoming calls - Battery level readout - Bluetooth headset support - Save CPU by disabling screen updates if the display is off or the app doesn't have input focus - N900: GStreamer audio backend Kudos to kugel for the code review. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
2010-12-25Make sim build compilable under Cygwin. Fixes FS#11832.Andree Buschmann1-1/+9
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28899 a1c6a512-1295-4272-9138-f99709370657
2010-12-23RaaA: Improve tagcache search to make the database built.Thomas Martitz1-10/+26
First, it add the ability to tagcache to walk through multiple search roots. Second, it adds symlinks targets to the search roots if they're are not inside any of the current search roots, otherwise the symlink is ignored (unless it's a file). The default search root is still /, so no search root will be actually added. But the tagcache now isn't trapped by recursive symlinks anymore and successfully builds, and it's prepared for a future music directory setting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28884 a1c6a512-1295-4272-9138-f99709370657
2010-12-06Get rid of get_user_file_path and do the path handling in wrappers for ↵Thomas Martitz1-1/+0
open() and friends. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-02Fix player sim yellowThomas Martitz2-2/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28725 a1c6a512-1295-4272-9138-f99709370657
2010-11-18Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.Jonathan Gordon1-0/+26
As a conditional it scales its value to the number of options you give it (like volume) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
2010-10-31Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. ↵Marcin Bukat1-1/+107
FS#11189 by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
2010-09-09Extend lc_open() to also being able to load overlay plugins.Thomas Martitz1-1/+1
For this it needs to look at the plugin header. Since lc_open() doesn't know it's a plugin, the header needs to be changed slightly to include the new lc_header (which needs to be the first element in plugin_header so it can be casted savely). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28054 a1c6a512-1295-4272-9138-f99709370657
2010-09-08Revert r27972 to fix FS#11610 (but in a way android builds still work).Thomas Martitz1-7/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28050 a1c6a512-1295-4272-9138-f99709370657
2010-09-08fix red.Thomas Martitz1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28049 a1c6a512-1295-4272-9138-f99709370657
2010-09-08Cleanup io.c a bit.Thomas Martitz1-18/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28048 a1c6a512-1295-4272-9138-f99709370657
2010-09-02Move commentThomas Martitz1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27978 a1c6a512-1295-4272-9138-f99709370657
2010-09-02Android: don't compile stubs.c and kill off libuisimulator entirely.Thomas Martitz1-4/+2
Seperate make rules in a almost empty android.make. Also add forgotten powermgmt-android.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27977 a1c6a512-1295-4272-9138-f99709370657
2010-09-01Android: don't compile powermgmt-sim.cThomas Martitz1-1/+1
Instead implement a bit of battery monitoring. Currently it only fetches the battery level (in %) every 30s, but it could do more like battery status, charger connected, voltage... Theoretically, we could also exit/quit after some time of inactivity too (perhaps not a bad idea since Rockbox puts a slight but still non-zero CPU load even if doing nothing). Ironically, Rockbox is now the only way to get the exact battery level (at least I haven't found anything yet) on my phone :-) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27974 a1c6a512-1295-4272-9138-f99709370657
2010-09-01Android: Don't compile sim_tasks.cThomas Martitz1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27973 a1c6a512-1295-4272-9138-f99709370657
2010-09-01Redo previous commit to not break android builds.Thomas Martitz1-0/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27972 a1c6a512-1295-4272-9138-f99709370657
2010-09-01Ged rid of uisimulator/common/io.c for android builds.Thomas Martitz2-9/+16
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants. Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know). For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one, the values can be retrieved via the new dir_get_info(). Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-08-27Use system headers a bit more: use host's fcntl.h for O_RDONLY etc.Thomas Martitz1-3/+6
Removes the need to fix up those in the simulator. Also work around some posix-mingw incompatibilities (e.g. getcwd()). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657
2010-08-272nd try: Introduce a small api for loading code (codecs,plugins) from ↵Thomas Martitz1-100/+16
disk/memory. It's a used by codec/plugin loading and vastly reduces code duplication. It's also a step forward in getting rid of libuisimulator in the application ports. Apparently sh needs linker symbols prefixed with _ even if they're referenced without from C code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27902 a1c6a512-1295-4272-9138-f99709370657
2010-08-27Revert "Introduce a small api for loading code (codecs,plugins) from ↵Thomas Martitz1-13/+100
disk/memory." I don't understand the build error at all, plugin_bss_start is clearly defined in plugin.lds git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27901 a1c6a512-1295-4272-9138-f99709370657
2010-08-26Introduce a small api for loading code (codecs,plugins) from disk/memory.Thomas Martitz1-100/+13
It's a used by codec/plugin loading and vastly reduces code duplication. It's also a step forward in getting rid of libuisimulator in the application ports. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27900 a1c6a512-1295-4272-9138-f99709370657
2010-08-02Rockbox as an application: Commit current Android port progress.Thomas Martitz2-11/+32
General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too). Problems: - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now. - no cabbiev2 (only some preliminary files for it), no other default theme. - screen flickers sometimes if the updates are too frequent - no multi screen apk/package - strange behavior when a phone call comes in The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder. I've put a small README in there for instructions. There are some steps needed after the make part, which are described there, and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657
2010-08-01Rockbox as an application: add get_user_file_path().Thomas Martitz1-7/+9
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox). This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local. On the DAPs it's a no-op, returing /.rockbox directly. Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-07-10Rename/change SIMVER to APP_TYPE in the Makefiles.Thomas Martitz1-1/+1
SIMVER was really only used to detect a simulator build. With APP_TYPE you can now differentiate between simulator, application, checkwps and database builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27372 a1c6a512-1295-4272-9138-f99709370657
2010-07-06Rockbox as an application: Add an 320x240 SDL application target.Thomas Martitz1-5/+8
It still works mostly like the simulator. There's also some minor left overs from the sim, but it does not define SIMULATOR. It installs into the current (build) dir, and you need to run it with '--root .' (because it looks for ./.rockbox and not ./simdisk/rockbox) as options. That's one of the few kludges left that should be resolved soon'ish. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27310 a1c6a512-1295-4272-9138-f99709370657
2010-07-04Simulator: build recording codeRafaël Carré1-0/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27280 a1c6a512-1295-4272-9138-f99709370657
2010-06-22sim_icons.c is actually only for charcell display simulation.Thomas Martitz2-5/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27069 a1c6a512-1295-4272-9138-f99709370657
2010-05-27Generate C file / header for svn version stringRafaël Carré1-1/+1
It's now easier to force rebuild of files depending on the svn revision version.c/version.h are generated once with new tools/genversion.sh Changes in the VCS are still not auto detected, so you'll have to remove builddir/version.* if you want to change the string in your binaries APPSVERSION is now called RBVERSION and is defined in the generated header instead of being defined by the Makefiles appsversion is now called rbversion (the plugin api number didn't change since old modules are still binary compatible) Change some bootloaders to use knwon-at-buildtime RBVERSION instead of "%s" + rbversion You'll need to run make clean to regenerate dependencies after the removal of apps/version.h To build binaries with a different version string, hand-edit tools/version.sh or tools/genversion.sh (which calls the former) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-22rtc_enable_alarm() needs no return valueRafaël Carré1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26245 a1c6a512-1295-4272-9138-f99709370657
2010-05-18Rename sdl lcd initialization to (remote_)lcd_init_device which enables ↵Thomas Martitz1-4/+0
removing two #ifdef SIMULATOR and makes it happen as on target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26137 a1c6a512-1295-4272-9138-f99709370657
2010-05-15- Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz3-22/+2
firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c. - Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization). This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-12fix the last of the reds, and make RDS tags actually work (and add them to ↵Jonathan Gordon1-0/+19
the hardcoded radio skin) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25966 a1c6a512-1295-4272-9138-f99709370657
2010-05-07Fix disastrous variable shadowing, change casts to unsigned in (cygwin ↵Thomas Martitz1-2/+3
doesn't like mode_t there, and unsigned int should be equally correct) and check the correct bitmask in sim_open(). Should repair filesystem accesses on the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25881 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Fix the remaining reds.Thomas Martitz1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25858 a1c6a512-1295-4272-9138-f99709370657