diff --git a/skeleton/SYSTEM/rg35xx/paks/MinUI.pak/launch.sh b/skeleton/SYSTEM/rg35xx/paks/MinUI.pak/launch.sh index bb700d2..1b4a580 100755 --- a/skeleton/SYSTEM/rg35xx/paks/MinUI.pak/launch.sh +++ b/skeleton/SYSTEM/rg35xx/paks/MinUI.pak/launch.sh @@ -15,6 +15,8 @@ export LD_LIBRARY_PATH=$SYSTEM_PATH/lib:$LD_LIBRARY_PATH ####################################### +echo noop > /sys/devices/b0238000.mmc/mmc_host/mmc0/emmc_boot_card/block/mmcblk0/queue/scheduler +echo noop > /sys/devices/b0230000.mmc/mmc_host/mmc1/sd_card/block/mmcblk1/queue/scheduler echo on > /sys/devices/b0238000.mmc/mmc_host/mmc0/power/control echo on > /sys/devices/b0230000.mmc/mmc_host/mmc1/power/control @@ -30,12 +32,12 @@ mkdir -p "$LOGS_PATH" mkdir -p "$USERDATA_PATH/.minui" AUTO_PATH=$USERDATA_PATH/auto.sh if [ -f "$AUTO_PATH" ]; then - "$AUTO_PATH" + "$AUTO_PATH" # &> $LOGS_PATH/auto.txt fi ####################################### -keymon.elf & # &> /mnt/sdcard/keymon.txt & +keymon.elf & # &> $LOGS_PATH/keymon.txt & # ./batmon.sh &> /mnt/sdcard/batmon.txt & ####################################### diff --git a/src/libmsettings/msettings.c b/src/libmsettings/msettings.c index bb69dc3..931b6ea 100644 --- a/src/libmsettings/msettings.c +++ b/src/libmsettings/msettings.c @@ -98,6 +98,8 @@ int GetBrightness(void) { // 0-10 return settings->brightness; } void SetBrightness(int value) { + if (settings->hdmi) return; + int raw; switch (value) { case 0: raw=16; break; // 0 @@ -130,15 +132,14 @@ void SetVolume(int value) { } void SetRawBrightness(int val) { // 0 - 1024 + if (settings->hdmi) return; + // printf("SetRawBrightness(%i)\n", val); fflush(stdout); int fd = open(BRIGHTNESS_PATH, O_WRONLY); if (fd>=0) { dprintf(fd,"%d",val); close(fd); } - - // this prevents exiting/launching from turning the screen back on - // SetHDMI(GetHDMI()); // TODO: isn't working } void SetRawVolume(int val) { // 0 - 40 int fd = open(VOLUME_PATH, O_WRONLY); @@ -157,18 +158,9 @@ void SetJack(int value) { settings->jack = value; SetVolume(GetVolume()); - - // TODO: tmp, testing hdmi without an hdmi output - // int fd = open(BACKLIGHT_PATH, O_WRONLY); - // if (fd>=0) { - // dprintf(fd,"%d",value ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK); - // close(fd); - // } } int GetHDMI(void) { - // TODO: tmp, testing hdmi without an hdmi output - // return settings->jack; // printf("GetHDMI() %i\n", settings->hdmi); fflush(stdout); return settings->hdmi; } diff --git a/src/minarch/main.c b/src/minarch/main.c index 3252b05..5ba34b1 100644 --- a/src/minarch/main.c +++ b/src/minarch/main.c @@ -594,22 +594,6 @@ enum { #define LOCAL_BUTTON_COUNT 14 #define RETRO_BUTTON_COUNT 16 // allow L3/R3 to be remapped by user if desired, eg. Virtual Boy uses extra buttons for right d-pad -static const char* device_button_names[LOCAL_BUTTON_COUNT] = { - [BTN_ID_UP] = "UP", - [BTN_ID_DOWN] = "DOWN", - [BTN_ID_LEFT] = "LEFT", - [BTN_ID_RIGHT] = "RIGHT", - [BTN_ID_SELECT] = "SELECT", - [BTN_ID_START] = "START", - [BTN_ID_Y] = "Y", - [BTN_ID_X] = "X", - [BTN_ID_B] = "B", - [BTN_ID_A] = "A", - [BTN_ID_L1] = "L1", - [BTN_ID_R1] = "R1", - [BTN_ID_L2] = "L2", - [BTN_ID_R2] = "R2", -}; typedef struct ButtonMapping { char* name; @@ -661,6 +645,24 @@ static ButtonMapping button_label_mapping[] = { // used to lookup the retro_id a }; static ButtonMapping core_button_mapping[RETRO_BUTTON_COUNT+1] = {0}; +static const char* device_button_names[LOCAL_BUTTON_COUNT] = { + [BTN_ID_UP] = "UP", + [BTN_ID_DOWN] = "DOWN", + [BTN_ID_LEFT] = "LEFT", + [BTN_ID_RIGHT] = "RIGHT", + [BTN_ID_SELECT] = "SELECT", + [BTN_ID_START] = "START", + [BTN_ID_Y] = "Y", + [BTN_ID_X] = "X", + [BTN_ID_B] = "B", + [BTN_ID_A] = "A", + [BTN_ID_L1] = "L1", + [BTN_ID_R1] = "R1", + [BTN_ID_L2] = "L2", + [BTN_ID_R2] = "R2", +}; + + // NOTE: these must be in BTN_ID_ order also off by 1 because of NONE (which is -1 in BTN_ID_ land) static char* button_labels[] = { "NONE", // displayed by default