summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sdl/button-sdl.c (follow)
Commit message (Collapse)AuthorAge
* Fix (unintentional) linkage of HAVE_BUTTON_DATA with HAVE_TOUCHSCREENSebastian Leonhardt2014-03-18
| | | | | | | | | | Defining HAVE_BUTTON_DATA without simultaneously defining HAVE_TOUCHSCREEN caused compile errors. (I need them separated for a scrollstrip driver.) Change-Id: I945d3437d840035ccc0c147f8155029b403c6ec2 Reviewed-on: http://gerrit.rockbox.org/771 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* simulator: Simulate external storage for HAVE_MULTIDRIVE.Thomas Martitz2014-02-23
| | | | | | | | | The virtual external storage can be inserted/extracted with the e key. This has little effect because there is no way to access the storage (yet, a later commit will change this). Except on ondio where the mmc needs to be extracted before entering USB (like on real target). Change-Id: I523402832f3b4ae71e0603b281aba4fb8592a897
* storage: Add STORAGE_HOSTFSThomas Martitz2014-02-23
| | | | | | | | | | | | CONFIG_STORAGE & STORAGE_HOSTFS allows to use parts of the storage_* API to be compiled for application targets without compiling storage.c or performing actually raw storage access. This is primarily to enable application targets to implement HAVE_MULTIVOMULE/HAVE_HOTSWAP (in a later commit). SIMULATOR uses the same mechanism without explicitely defining STORAGE_HOSTFS (how to add a bit to an existing preprocessor token?). Change-Id: Ib3f8ee0d5231e2ed21ff00842d51e32bc4fc7292
* sim/sdlapp: Do not quit immediately on panicf, but wait for quit.Thomas Martitz2014-02-02
| | | | Change-Id: I2f0b4b560f00a43ad4b240911e4c30a162deb6e3
* fix redAmaury Pouly2013-09-05
| | | | Change-Id: Ibca5879553a87e77014f850308d9b54cc339d474
* touch devices: Disable touch on softlock.Jean-Louis Biasini2013-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Target that have a touchpad/touchscreen should disable it while being locked (In order to avoid LCD to drain battery power due to "key locked" constant reporting messages. If they a have a keylock button this was already handled at driver level. If not (e.g. fuze+), they will have to implement a switch at driver level that action.c can operate on softlock. This patch does the following for any target having a touchpad or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target) 1) it implements the code to call button_enable_touch(bool en) in action.c. 2) button_enable_touch is implemented in button.c and call either touchpad_enable or touchscreen_enable 3) those two function are implemented respectively in touchscreen.c and a new touchpad.c file. They provide a generic way to silents touch's device and call a function at driver level where target specific code can be implemented if possible/needed (for power saving for instance). Those function name are touchpad_enable_device and touchscreen_enable_device 4) we implement an empty function at driver level of targets that need it to have them still being able to compiled. Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49 Reviewed-on: http://gerrit.rockbox.org/569 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Only use lcd-remote.h #ifdef HAVE_REMOTE_LCDRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31613 a1c6a512-1295-4272-9138-f99709370657
* Fix yellow.Thomas Martitz2011-11-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31013 a1c6a512-1295-4272-9138-f99709370657
* Remove sim_tasks from the sdl application build.Thomas Martitz2011-11-17
| | | | | | This unfortunately removes the screendump feature, but usually there are better desktop apps for that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31011 a1c6a512-1295-4272-9138-f99709370657
* Simulate usb plugging on the sim better using sim_tasks.Thomas Martitz2011-11-17
| | | | | | Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12351: The poweroff timer was not reset on scroll wheel activity for ↵Andree Buschmann2011-10-28
| | | | | | e200 and simulator. Thanks to Nick Peskett. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30847 a1c6a512-1295-4272-9138-f99709370657
* Exit of SDL_WaitEvent() returns an error.Thomas Martitz2011-09-08
| | | | | | 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
* Remove a couple of duplicate #includesBertrik Sikken2011-08-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30301 a1c6a512-1295-4272-9138-f99709370657
* Hopefully get shutdown/exit handling on SDL/maemo right.Thomas Martitz2011-02-28
| | | | | | 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
* Pandora port: Exit rockbox by pressing the SELECT buttonThomas Jarosch2011-02-28
| | | | | | | | 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
* N900: Prevent stuck up/down keys on systems with shared up/down cursor mappingThomas Jarosch2011-02-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29331 a1c6a512-1295-4272-9138-f99709370657
* Fix red caused by incorrect includes.Thomas Martitz2011-02-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29329 a1c6a512-1295-4272-9138-f99709370657
* Fix the shutdown sequence for maemo, SDL and simulator buildsThomas Jarosch2011-02-15
| | | | | | | 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
* Initial maemo platform supportThomas Jarosch2011-02-08
| | | | | | | | | | | | | | | | | | 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
* Make --zoom option of the sdl port correctly work with mouse clicks.Thomas Martitz2010-11-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28500 a1c6a512-1295-4272-9138-f99709370657
* Move to a proper sdl key config instead of using the d2 pad. make the mouse ↵Jonathan Gordon2010-08-26
| | | | | | 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
* Fix red in app buildsThomas Martitz2010-07-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27375 a1c6a512-1295-4272-9138-f99709370657
* SDL: fix typoRafaël Carré2010-07-10
| | | | | | 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
* SDL enhancements:Rafaël Carré2010-07-10
| | | | | | | | | - 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
* Rockbox as an application: Add an 320x240 SDL application target.Thomas Martitz2010-07-06
| | | | | | | 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
* SDL target: remove mouse polling and replace it with an event-based ↵Maurus Cuelenaere2010-06-15
| | | | | | mechanism, this makes touchscreen on the sim much smoother git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26860 a1c6a512-1295-4272-9138-f99709370657
* Fix most reds, I have no idea what's wrong with the gigabeats (yet).Thomas Martitz2010-06-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26619 a1c6a512-1295-4272-9138-f99709370657
* Move target-simulating specific keymaps out of button-sdl.c into a file perThomas Martitz2010-06-06
| | | | | | | | 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
* Mini2440: Fix simulator. It's touchscreen so there's button clashes when ↵Thomas Martitz2010-06-05
| | | | | | 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
* SDL Simulator: Get thread shutdown and properly handled and fix a minor ↵Michael Sevakis2010-05-27
| | | | | | memory leak that happens when threads exit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26336 a1c6a512-1295-4272-9138-f99709370657
* Since the sdl to target tree move, the main thread cannot be removed anymore,Thomas Martitz2010-05-26
| | | | | | | | | 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
* sdl: call SDL_Quit() before exiting when receiving the SDL_QUIT event. It is ↵Amaury Pouly2010-05-25
| | | | | | 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
* Fix FS#11280Thomas Martitz2010-05-17
| | | | | | | | | | | SDL docs say SDL_PumpEvent (implicitely called by SDL_Poll/WaitEvent) may only be called from the thread that initializes the video subsystem, apparently because Windows requires that. So create an (or bring it back) SDL thread (with preemtive behavior) to read the event queue for buttons and initialize the video subsystem. I'd probably would have done that anyway because it enables an interrupt-like method to read them (no polling). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26113 a1c6a512-1295-4272-9138-f99709370657
* Fix building on cygwin.Thomas Martitz2010-05-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26076 a1c6a512-1295-4272-9138-f99709370657
* - Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz2010-05-15
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