summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/sdl
AgeCommit message (Collapse)AuthorFilesLines
2011-09-08Exit of SDL_WaitEvent() returns an error.Thomas Martitz1-1/+3
It doesn't appear recoverable, but instead only spams the commandline. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30482 a1c6a512-1295-4272-9138-f99709370657
2011-09-01Shuffle some functions around so that interfacing with playback.c in ↵Michael Sevakis1-1/+1
particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
2011-08-14Remove a couple of duplicate #includesBertrik Sikken1-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30301 a1c6a512-1295-4272-9138-f99709370657
2011-06-29Commit FS#12150 - Fully-functional audio mixer - and finally whip old ↵Michael Sevakis1-2/+45
limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-05-25Fix SDL touch screen handling on the screen edgesThomas Jarosch1-2/+13
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29925 a1c6a512-1295-4272-9138-f99709370657
2011-04-16Define LCD dpi for n900, n8xx and the pandoraThomas Jarosch1-0/+8
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29728 a1c6a512-1295-4272-9138-f99709370657
2011-03-05Change the thread api a bit.Thomas Martitz1-10/+12
* Remove THREAD_ID_CURRENT macro in favor of a thread_self() function, this allows thread functions to be simpler. * thread_self_entry() shortcut for kernel.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29521 a1c6a512-1295-4272-9138-f99709370657
2011-03-05Add svn:keywords to firmware/target/hosted source filesThomas Jarosch1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29516 a1c6a512-1295-4272-9138-f99709370657
2011-03-03Fix compilation issues for sdl when HAVE_BUTTON_DATA is not definedFrank Gevaerts1-0/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29511 a1c6a512-1295-4272-9138-f99709370657
2011-03-01Expose sys_poweroff() and cancel_shutdown() to RaaA. Hopefully fixes android ↵Thomas Jarosch1-6/+0
build git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29485 a1c6a512-1295-4272-9138-f99709370657
2011-02-28brackets are important! fix the mouse being hidden in simsJonathan Gordon1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29458 a1c6a512-1295-4272-9138-f99709370657
2011-02-28Hopefully get shutdown/exit handling on SDL/maemo right.Thomas Martitz4-31/+45
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-28Pandora port: Exit rockbox by pressing the SELECT buttonThomas Jarosch1-0/+6
Might get remapped to another button later on, for example if we map the START button to the main menu, then those two buttons are too close together. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29453 a1c6a512-1295-4272-9138-f99709370657
2011-02-27RaaA: Add initial Pandora supportThomas Jarosch2-3/+3
More information: www.openpandora.org Possible things to implement: - Special button mappings - Battery monitoring - ALSA audio backend - Automate creation of "pnd" (=binary) file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29451 a1c6a512-1295-4272-9138-f99709370657
2011-02-19N900: Prevent stuck up/down keys on systems with shared up/down cursor mappingThomas Jarosch1-1/+15
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29331 a1c6a512-1295-4272-9138-f99709370657
2011-02-18Fix red caused by incorrect includes.Thomas Martitz1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29329 a1c6a512-1295-4272-9138-f99709370657
2011-02-18Implement cooperative threads on hosted platforms using C code.Thomas Martitz4-10/+78
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/+5
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 Jarosch5-2/+107
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
2011-01-20Fix FS#11881. Patch by Thomas JaroschThomas Martitz1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29098 a1c6a512-1295-4272-9138-f99709370657
2010-12-29Return thread ID as a string for name when a thread isn't named or name ↵Michael Sevakis1-2/+2
cannot be used, as comment says, not slot pointer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28928 a1c6a512-1295-4272-9138-f99709370657
2010-12-29interrupt_level should've been volatile as well when I changed this file. ↵Michael Sevakis1-1/+1
Obtuseness FTW. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28924 a1c6a512-1295-4272-9138-f99709370657
2010-12-28UISimulator: Need a 'while' not an 'if' in sim_enter_irq_handler. Add ↵Michael Sevakis1-5/+14
comments explaining things. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28916 a1c6a512-1295-4272-9138-f99709370657
2010-12-27Vastly increase speed of SDL screen updates for RGB565.Thomas Martitz2-9/+40
Flyspray: FS#11834 (with minor changes by me). Author: Thomas Jarosch git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28914 a1c6a512-1295-4272-9138-f99709370657
2010-12-27Return interval in the SDL timer callback as it should happen in periodic ↵Thomas Martitz1-1/+1
timers. If the SDL timer resolution was higher than 10ms it would have restarted the timer after 1ms, but it made no difference. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28912 a1c6a512-1295-4272-9138-f99709370657
2010-12-08MPIO HD300 simulator. FS#11796 by Michael LeslieMarcin Bukat1-0/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28775 a1c6a512-1295-4272-9138-f99709370657
2010-12-02Change the gcc options for sdl builds to allow for gnu99 features, it needs ↵Thomas Martitz1-2/+2
some fixes in other places. Fixes test_mem compilation failure on cygwin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28723 a1c6a512-1295-4272-9138-f99709370657
2010-11-10Touchscreen: Improved scroll thresholdThomas Martitz1-0/+6
Remove the hardcoded (and way too small) scroll threshold (the distance moved in pixels before we think the users wants to scroll) and replace it with something based on the actual DPI of the screen. On Android we call the API for that, on other touchscreens we reimplemented Android's formula (as of 2.2) and calculate it. Flyspray: 11727 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28548 a1c6a512-1295-4272-9138-f99709370657
2010-11-05Make --zoom option of the sdl port correctly work with mouse clicks.Thomas Martitz1-7/+15
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28500 a1c6a512-1295-4272-9138-f99709370657
2010-10-21HDD6330: add the simulator.Szymon Dziok1-0/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28323 a1c6a512-1295-4272-9138-f99709370657
2010-10-13fix button maps and assign some buttons for uisimulator.Teruaki Kawashima2-2/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28268 a1c6a512-1295-4272-9138-f99709370657
2010-08-26Move to a proper sdl key config instead of using the d2 pad. make the mouse ↵Jonathan Gordon4-27/+93
wheel work, middle click is "select" and right click is "back" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27891 a1c6a512-1295-4272-9138-f99709370657
2010-08-12Move memset6() declaration to string-extra.h, kills a warning compiling for ↵Thomas Martitz1-1/+1
android since it ships a memory.h. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27789 a1c6a512-1295-4272-9138-f99709370657
2010-07-15Don't duplicate byteswap code. Invent system where NEED_GENERIC_BYTESWAPS is ↵Nils Wallménius1-0/+3
set if the generic functions from system.h are needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27440 a1c6a512-1295-4272-9138-f99709370657
2010-07-10Fix red in app buildsThomas Martitz1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27375 a1c6a512-1295-4272-9138-f99709370657
2010-07-10SDL: fix typoRafaël Carré1-1/+1
BUTTON_LEFT is a rockbox define, we must use SDL_BUTTON_LEFT git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27367 a1c6a512-1295-4272-9138-f99709370657
2010-07-10SDL enhancements:Rafaël Carré3-99/+127
- remove infinite loop after exit() - make sure picture_surface is initialized, and free it - split gui_message_loop() in 3 functions and change prototype - some code is only used in simulator git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27366 a1c6a512-1295-4272-9138-f99709370657
2010-07-06Rockbox as an application: Add an 320x240 SDL application target.Thomas Martitz11-2/+346
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-04sim: add spdif_measure_frequency() stub for HAVE_SPDIF_INRafaël Carré1-0/+9
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27281 a1c6a512-1295-4272-9138-f99709370657
2010-07-04Simulator: build recording codeRafaël Carré1-4/+11
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27280 a1c6a512-1295-4272-9138-f99709370657
2010-06-17Switch iPod 3G to use EABI toolchain. Make necessary threading changes to ↵Michael Sevakis1-0/+5
avoid use of stack after switching to idle stack. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26898 a1c6a512-1295-4272-9138-f99709370657
2010-06-15SDL target: remove mouse polling and replace it with an event-based ↵Maurus Cuelenaere1-35/+31
mechanism, this makes touchscreen on the sim much smoother git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26860 a1c6a512-1295-4272-9138-f99709370657
2010-06-06Fix most reds, I have no idea what's wrong with the gigabeats (yet).Thomas Martitz1-1/+33
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26619 a1c6a512-1295-4272-9138-f99709370657
2010-06-06Move target-simulating specific keymaps out of button-sdl.c into a file perThomas Martitz1-1659/+11
keypad. Copyright is restored for each keymap according to git blame. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26615 a1c6a512-1295-4272-9138-f99709370657
2010-06-05Mini2440: Fix simulator. It's touchscreen so there's button clashes when ↵Thomas Martitz1-34/+1
trying to map the 6 hw buttons as well. Just remove that for now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26590 a1c6a512-1295-4272-9138-f99709370657
2010-05-27Simulator: get rid of SDL_mutex* parameter to sim_do_exit.Michael Sevakis3-14/+22
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26338 a1c6a512-1295-4272-9138-f99709370657
2010-05-27SDL Simulator: Get thread shutdown and properly handled and fix a minor ↵Michael Sevakis4-29/+90
memory leak that happens when threads exit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26336 a1c6a512-1295-4272-9138-f99709370657
2010-05-26UISimulator: cleaner startup using semaphore only to tell when event_thread ↵Michael Sevakis1-26/+11
is done initializing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26317 a1c6a512-1295-4272-9138-f99709370657
2010-05-26Since the sdl to target tree move, the main thread cannot be removed anymore,Thomas Martitz2-2/+6
since it's now the default thread which is implicitely created by starting the sim. This caused a segfault that r26283 tried to fix. Revert r26283 and protect the main thread from being removed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26315 a1c6a512-1295-4272-9138-f99709370657
2010-05-25sdl: call SDL_Quit() before exiting when receiving the SDL_QUIT event. It is ↵Amaury Pouly1-0/+1
necessary as the sdl tree move removed the atexit(SDL_Quit); git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26283 a1c6a512-1295-4272-9138-f99709370657