Tasklist
FS#11898 - This is a preliminary patch to add keymaps needed for plugin on the android port
| Task Type |
Patches |
| Category |
Playlists |
| Status |
Unconfirmed |
| Assigned To |
No-one |
| Player Type |
Another |
| Severity |
Low |
| Priority |
Normal |
| Reported Version |
Release 3.7.1 |
| Due in Version |
Undecided |
| Due Date |
Undecided |
| Percent Complete |
|
| Private |
No
|
|
Details
This is a preliminary patch to add the key maps needed to compile plugins for the android port. It is mostly complete.
You will need to change plugins="yes" line 2790 of file /tools/configure but this breaks the sdl port.
Most plugins seem to work well some don't, I have not tested all plugins yet but will start as soon I post this.
To Do:
add a section to tools/configure that defines plugins="yes" for the android port and "no" for the sdl port
Testing testing testing
Warning
This patch probably breaks some targets because of logo.c defaulting to a generic keymap which I changed "commented out" and added #error No keymaps defined! so the compiler will not just over look it. Let me know what breaks and I will try to fix it.
ANDROID_KEYMAPS_FOR_PLUGINS.patch
(46.2 KiB)
./rockbox/apps/plugins/blackjack.c | 15 ++++++++
./rockbox/apps/plugins/bounce.c | 9 ++++
./rockbox/apps/plugins/brickmania.c | 9 ++++
./rockbox/apps/plugins/calculator.c | 10 +++++
./rockbox/apps/plugins/calendar.c | 10 +++++
./rockbox/apps/plugins/chessbox/chessbox_pgn.h | 13 +++++++
./rockbox/apps/plugins/chessclock.c | 24 +++++++++----
./rockbox/apps/plugins/chip8.c | 9 ++++
./rockbox/apps/plugins/chopper.c | 5 ++
./rockbox/apps/plugins/clix.c | 10 +++++
./rockbox/apps/plugins/cube.c | 11 ++++++
./rockbox/apps/plugins/doom/i_video.c | 10 ++++-
./rockbox/apps/plugins/fft/fft.c | 9 ++++
./rockbox/apps/plugins/flipit.c | 12 ++++++
./rockbox/apps/plugins/fractals/fractal.h | 14 +++++++
./rockbox/apps/plugins/imageviewer/imageviewer_button.h | 12 ++++++
./rockbox/apps/plugins/invadrox.c | 7 +++
./rockbox/apps/plugins/jewels.c | 10 +++++
./rockbox/apps/plugins/logo.c | 19 +++++++++-
./rockbox/apps/plugins/matrix.c | 6 +++
./rockbox/apps/plugins/midi/midiplay.c | 8 ++++
./rockbox/apps/plugins/minesweeper.c | 11 ++++++
./rockbox/apps/plugins/mosaique.c | 5 ++
./rockbox/apps/plugins/mp3_encoder.c | 6 +++
./rockbox/apps/plugins/mpegplayer/mpegplayer.c | 9 ++++
./rockbox/apps/plugins/mpegplayer/mpeg_settings.c | 8 ++++
./rockbox/apps/plugins/oscilloscope.c | 12 ++++++
./rockbox/apps/plugins/pacbox/pacbox.h | 12 ++++++
./rockbox/apps/plugins/pegbox.c | 11 ++++++
./rockbox/apps/plugins/pong.c | 8 ++++
./rockbox/apps/plugins/reversi/reversi-gui.h | 11 ++++++
./rockbox/apps/plugins/robotfindskitten.c | 8 ++--
./rockbox/apps/plugins/rockblox1d.c | 6 ++-
./rockbox/apps/plugins/rockblox.c | 13 +++++++
./rockbox/apps/plugins/rockboy/rockboy.c | 11 ++++++
./rockbox/apps/plugins/rockpaint.c | 11 ++++++
./rockbox/apps/plugins/sliding_puzzle.c | 10 +++++
./rockbox/apps/plugins/snake2.c | 9 ++++
./rockbox/apps/plugins/snake.c | 8 ++++
./rockbox/apps/plugins/snow.c | 3 +
./rockbox/apps/plugins/sokoban.c | 29 ++++++++++++++++
./rockbox/apps/plugins/solitaire.c | 27 ++++++++++++++
./rockbox/apps/plugins/spacerocks.c | 9 ++++
./rockbox/apps/plugins/star.c | 17 +++++++++
./rockbox/apps/plugins/stats.c | 3 +
./rockbox/apps/plugins/sudoku/sudoku.h | 13 +++++++
./rockbox/apps/plugins/text_viewer/tv_button.h | 12 ++++++
./rockbox/apps/plugins/vu_meter.c | 13 +++++++
./rockbox/apps/plugins/wormlet.c | 9 ++++
./rockbox/apps/plugins/xobox.c | 9 ++++
./rockbox/apps/plugins/zxbox/keymaps.h | 9 ++++
./rockbox/apps/plugins/zxbox/zxbox_keyb.c | 9 ++++
52 files changed, 546 insertions(+), 17 deletions(-)
|
Loading...
Apply over the first patch
fixes a missing BUTTON_MAIN issue not sure my fix is the right one
I'm thinking it makes more sense to work on making the plugins touchscreen aware (not using the grid mode, of course). As this is a lot of work and takes time we can probably do it one by one (perhaps with a seperate SOURCES.android)
Some games are more enjoyable with a touch screen. Also some seem unplayable using the touch screen, so it's in my mind its win/win. They will probably always make at least one model with a flip out keyboard. I could not see myself buying one without this feature. And in that case redirecting the keymaps to those targets is halfway done now. Well zxbox could really make use of the extra keys. Besides this patch is intended to just get the darn thing compiled with plugin="yes" enabled. Also if the work being done toward making rockbox screen size independent gets committed most plugins will have to be touched up to compile without error any way.
Anyone have any ideas about logo.c and it's generic keymap?
In button-target.h, any thoughts about BUTTON_MAIN as 0x00000040 because BUTTON_DPAD_CENTER is 0x00000040 as well, would this cause problems?
Still not sure about logo.c using a default key map instead of giving error
Changed the androids button-target.h to say #define BUTTON_MAIN BUTTON_DPAD_CENTER duh I feel stupid
This patch also adds android key maps to pluginlib_actions.c most plugins us this and even if your android target has no DPAD the menu and back keys behave as you would expect.
You still have to change plugins="yes" line 2790 of file /tools/configure, maybe I'll work this out tonight.
As well as if the back button functions as exit/back
Is it 4 am already?
This patch is mainly for only the keymaps, you know, so we can press back or menu from a plugin and it performs the appropriate action, and yes play games with dpad for those targets that have one.
I dissected my first patch and separated out patches according to what did what. So here it is to make this final patch work you need to use patches
FS#11899,the final patch I'm up loading now, thenFS#11900andFS#11901. Also you still need to change plugins="yes" line 2790 of file /tools/configure before you run configure.If things look good to the Devs could one commit these changes and I'll get started on fixing some plugins that don't work for the android.
These patches do not enable plugins="yes" so it should not interfere with anybody else's work at the moment.
- I fixed my white space, removed personal comments, remapped alot of keys to make them more intuitive, updated the helper text where applicable, and removed lots of *_PRE defines I just didn't need.
button-target.h_ANDROID_DEFINE_BUTTON_MAIN.patch
- just adds a BUTTON_MAIN to /firmware/target/hosted/android/apps/button_target.h. I guess it is from some older unified keymap scheme. rockboy fails to build without it.
With these two patches enabling plugins="yes" line 2790 of file /tools/configure will compile cleanly without error or warning against current svn for the android target.
To Do:
none
These patches allow compiling with plugin="yes" on all arbitrary screen sizes from 240x320 and up.
While not explicitly for the android target they are still in line (patch after) with the above patches. If you like I can fix that and resubmit it.
The logic should not interfere with any existing targets but the effected plugins still need some TLC.
note - All targets above 640x480 default to 640x480 bitmaps
3-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-bitmaps-native-SOURCES.patch
4-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-bitmaps-mono-SOURCES.patch
5-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-bitmaps-native-SOURCES.patch
6-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-bubbles.c.patch
7-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-invadrox.c.patch
8-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-rockblox.c.patch
9-PLUGIN_ARBITRARY_SIZES_ABOVE_240x320_apps-plugins-sudoku-sudoku.c.patch
Todo:
bubbles.c, invadrox.c rockblox.c, sudoku.c need bug tested and fixed up
* add wormlet to to do list
If a Developer can look at the second to the last one on this page, with the BUTTON_REL work around, so menu, back and track pad can be added to the plugins controls.