just some clean up
too tired to do more
This commit is contained in:
parent
e914446328
commit
ee5ef3a64d
3 changed files with 26 additions and 30 deletions
|
|
@ -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/b0238000.mmc/mmc_host/mmc0/power/control
|
||||||
echo on > /sys/devices/b0230000.mmc/mmc_host/mmc1/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"
|
mkdir -p "$USERDATA_PATH/.minui"
|
||||||
AUTO_PATH=$USERDATA_PATH/auto.sh
|
AUTO_PATH=$USERDATA_PATH/auto.sh
|
||||||
if [ -f "$AUTO_PATH" ]; then
|
if [ -f "$AUTO_PATH" ]; then
|
||||||
"$AUTO_PATH"
|
"$AUTO_PATH" # &> $LOGS_PATH/auto.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
keymon.elf & # &> /mnt/sdcard/keymon.txt &
|
keymon.elf & # &> $LOGS_PATH/keymon.txt &
|
||||||
# ./batmon.sh &> /mnt/sdcard/batmon.txt &
|
# ./batmon.sh &> /mnt/sdcard/batmon.txt &
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ int GetBrightness(void) { // 0-10
|
||||||
return settings->brightness;
|
return settings->brightness;
|
||||||
}
|
}
|
||||||
void SetBrightness(int value) {
|
void SetBrightness(int value) {
|
||||||
|
if (settings->hdmi) return;
|
||||||
|
|
||||||
int raw;
|
int raw;
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 0: raw=16; break; // 0
|
case 0: raw=16; break; // 0
|
||||||
|
|
@ -130,15 +132,14 @@ void SetVolume(int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRawBrightness(int val) { // 0 - 1024
|
void SetRawBrightness(int val) { // 0 - 1024
|
||||||
|
if (settings->hdmi) return;
|
||||||
|
|
||||||
// printf("SetRawBrightness(%i)\n", val); fflush(stdout);
|
// printf("SetRawBrightness(%i)\n", val); fflush(stdout);
|
||||||
int fd = open(BRIGHTNESS_PATH, O_WRONLY);
|
int fd = open(BRIGHTNESS_PATH, O_WRONLY);
|
||||||
if (fd>=0) {
|
if (fd>=0) {
|
||||||
dprintf(fd,"%d",val);
|
dprintf(fd,"%d",val);
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this prevents exiting/launching from turning the screen back on
|
|
||||||
// SetHDMI(GetHDMI()); // TODO: isn't working
|
|
||||||
}
|
}
|
||||||
void SetRawVolume(int val) { // 0 - 40
|
void SetRawVolume(int val) { // 0 - 40
|
||||||
int fd = open(VOLUME_PATH, O_WRONLY);
|
int fd = open(VOLUME_PATH, O_WRONLY);
|
||||||
|
|
@ -157,18 +158,9 @@ void SetJack(int value) {
|
||||||
|
|
||||||
settings->jack = value;
|
settings->jack = value;
|
||||||
SetVolume(GetVolume());
|
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) {
|
int GetHDMI(void) {
|
||||||
// TODO: tmp, testing hdmi without an hdmi output
|
|
||||||
// return settings->jack;
|
|
||||||
// printf("GetHDMI() %i\n", settings->hdmi); fflush(stdout);
|
// printf("GetHDMI() %i\n", settings->hdmi); fflush(stdout);
|
||||||
return settings->hdmi;
|
return settings->hdmi;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -594,22 +594,6 @@ enum {
|
||||||
|
|
||||||
#define LOCAL_BUTTON_COUNT 14
|
#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
|
#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 {
|
typedef struct ButtonMapping {
|
||||||
char* name;
|
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 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)
|
// 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[] = {
|
static char* button_labels[] = {
|
||||||
"NONE", // displayed by default
|
"NONE", // displayed by default
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue