Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

rgnano: UI simulator support

Change-Id: Id488d16e01ef49a9d1b57641bc1c22ed2fef4931

authored by

Hairo R. Carela and committed by
Solomon Peachy
7b0f408c b52bf1bf

+102 -3
+2 -2
firmware/SOURCES
··· 74 74 target/hosted/sdl/lcd-remote-bitmap.c 75 75 #endif 76 76 target/hosted/sdl/lcd-sdl.c 77 - #ifndef RG_NANO 77 + #if !defined(RG_NANO) || defined(SIMULATOR) 78 78 target/hosted/sdl/window-sdl.c 79 79 #endif 80 80 target/hosted/sdl/system-sdl.c ··· 226 226 target/hosted/maemo/maemo-thread.c 227 227 #endif 228 228 229 - #ifdef RG_NANO 229 + #if defined(RG_NANO) && !defined(SIMULATOR) 230 230 target/hosted/sysfs.c 231 231 target/hosted/power-linux.c 232 232 target/hosted/backlight-unix.c
+5
firmware/export/config/rgnano.h
··· 3 3 */ 4 4 5 5 /* We don't run on hardware directly */ 6 + #ifndef SIMULATOR 6 7 #define CONFIG_PLATFORM (PLATFORM_HOSTED) 7 8 #define PIVOT_ROOT "/mnt" 9 + #endif 10 + 8 11 #define HAVE_FPU 9 12 10 13 /* For Rolo and boot loader */ ··· 12 15 13 16 #define MODEL_NAME "RG Nano" 14 17 18 + #ifndef SIMULATOR 15 19 #define USB_NONE 20 + #endif 16 21 17 22 /* define this if you have a colour LCD */ 18 23 #define HAVE_LCD_COLOR
+7
firmware/target/hosted/sdl/sim-ui-defines.h
··· 536 536 #define UI_LCD_POSX 46 537 537 #define UI_LCD_POSY 61 538 538 539 + #elif defined(RG_NANO) 540 + #define UI_TITLE "Anbernic RG Nano" 541 + #define UI_WIDTH 370 542 + #define UI_HEIGHT 604 543 + #define UI_LCD_POSX 64 544 + #define UI_LCD_POSY 78 545 + 539 546 540 547 #elif defined(SIMULATOR) 541 548 #error no UI defines
+5 -1
tools/configure
··· 283 283 LDOPTS="$LDOPTS -fsanitize=undefined" 284 284 fi 285 285 286 + # Clear FUNKEY_SDK SDL1.2 path from LDOPTS 287 + if [ "$modelname" = "rgnano" ]; then 288 + LDOPTS="" 289 + fi 290 + 286 291 # Some linux setups like to warn about unused results. They are correct, 287 292 # but cleaning this up is a lot of work. 288 293 GCCOPTS="$GCCOPTS -Wno-unused-result" ··· 3667 3672 t_cpu="hosted" 3668 3673 t_manufacturer="anbernic" 3669 3674 t_model="rgnano" 3670 - extradefines="$extradefines -DOS_USE_BYTESWAP_H" 3671 3675 ;; 3672 3676 3673 3677 210|hifietma9)
uisimulator/bitmaps/UI-rgnano.bmp

This is a binary file and will not be displayed.

+2
uisimulator/buttonmap/SOURCES
··· 89 89 fiio-m3k.c 90 90 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 91 91 shanling-q1.c 92 + #elif CONFIG_KEYPAD == RG_NANO_PAD 93 + rg-nano.c 92 94 #endif 93 95 #endif /* SIMULATOR */
+81
uisimulator/buttonmap/rg-nano.c
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2010 Szymon Dziok 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 2 15 + * of the License, or (at your option) any later version. 16 + * 17 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 + * KIND, either express or implied. 19 + * 20 + ****************************************************************************/ 21 + 22 + 23 + #include <SDL.h> 24 + #include "button.h" 25 + #include "buttonmap.h" 26 + 27 + int key_to_button(int keyboard_button) 28 + { 29 + int new_btn = BUTTON_NONE; 30 + switch (keyboard_button) 31 + { 32 + case SDLK_KP_4: 33 + case SDLK_LEFT: 34 + new_btn = BUTTON_LEFT; 35 + break; 36 + case SDLK_KP_6: 37 + case SDLK_RIGHT: 38 + new_btn = BUTTON_RIGHT; 39 + break; 40 + case SDLK_KP_8: 41 + case SDLK_UP: 42 + new_btn = BUTTON_UP; 43 + break; 44 + case SDLK_KP_2: 45 + case SDLK_DOWN: 46 + new_btn = BUTTON_DOWN; 47 + break; 48 + case SDLK_KP_5: 49 + case SDLK_RETURN: 50 + case SDLK_x: 51 + new_btn = BUTTON_A; 52 + break; 53 + case SDLK_ESCAPE: 54 + case SDLK_z: 55 + new_btn = BUTTON_B; 56 + break; 57 + case SDLK_s: 58 + new_btn = BUTTON_X; 59 + break; 60 + case SDLK_a: 61 + new_btn = BUTTON_Y; 62 + break; 63 + case SDLK_q: 64 + new_btn = BUTTON_L; 65 + break; 66 + case SDLK_w: 67 + new_btn = BUTTON_R; 68 + break; 69 + case SDLK_n: 70 + new_btn = BUTTON_FN; 71 + break; 72 + case SDLK_m: 73 + new_btn = BUTTON_START; 74 + break; 75 + } 76 + return new_btn; 77 + } 78 + 79 + struct button_map bm[] = { 80 + { 0, 0, 0, 0, "None" } 81 + };