Merge pull request #1602 from fewtarius/dev

Updates - drop preempt_rt - move brightness back to R2 across devices.
This commit is contained in:
fewtarius 2023-06-19 07:21:55 -04:00 committed by GitHub
commit 11f1693ee8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 54 additions and 7967 deletions

View file

@ -1,62 +0,0 @@
diff --git a/core_options.h b/core_options.h
index a00b36a..7e6b4db 100644
--- a/core_options.h
+++ b/core_options.h
@@ -409,21 +409,6 @@ static retro_core_option_v2_definition option_defs[] =
},
"svga_s3"
},
- {
- "dosbox_pure_svgamem",
- "SVGA Memory (restart required)", NULL,
- "The amount of memory available to the emulated SVGA card.", NULL,
- "Video",
- {
- { "0", "512KB" },
- { "1", "1MB" },
- { "2", "2MB (default)" },
- { "3", "3MB" },
- { "4", "4MB" },
- { "8", "8MB (not always recognized)" },
- },
- "2"
- },
{
"dosbox_pure_voodoo",
"3dfx Voodoo Emulation", NULL,
diff --git a/dosbox_pure_libretro.cpp b/dosbox_pure_libretro.cpp
index c51753a..9c4f405 100644
--- a/dosbox_pure_libretro.cpp
+++ b/dosbox_pure_libretro.cpp
@@ -3556,7 +3556,6 @@ static bool check_variables(bool is_startup = false)
case 'p': dbmachine = "pcjr"; break;
}
Variables::DosBoxSet("dosbox", "machine", dbmachine, false, true);
- Variables::DosBoxSet("dosbox", "vmemsize", retro_get_variable("dosbox_pure_svgamem", "2"), false, true);
if (dbp_reboot_machine)
control->GetSection("dosbox")->GetProp("machine")->OnChangedByConfigProgram(), dbp_reboot_machine = 0;
@@ -3640,7 +3639,6 @@ static bool check_variables(bool is_startup = false)
}
Variables::RetroVisibility("dosbox_pure_svga", machine_is_svga);
- Variables::RetroVisibility("dosbox_pure_svgamem", machine_is_svga);
Variables::RetroVisibility("dosbox_pure_voodoo", machine_is_svga);
Variables::RetroVisibility("dosbox_pure_voodoo_perf", machine_is_svga);
if (machine_is_svga)
diff --git a/src/hardware/vga_s3.cpp b/src/hardware/vga_s3.cpp
index 06eafe7..ac82258 100644
--- a/src/hardware/vga_s3.cpp
+++ b/src/hardware/vga_s3.cpp
@@ -546,11 +546,6 @@ void SVGA_Setup_S3Trio(void) {
} else if (vga.vmemsize < 4096*1024) {
vga.vmemsize = 3072*1024;
vga.s3.reg_36 = 0x5a; // 3mb fast page mode
-#ifdef C_DBP_LIBRETRO
- } else if (vga.vmemsize == 8192*1024) { // hack more mem than supported by real Trio64 card
- vga.vmemsize = 8192*1024;
- vga.s3.reg_36 = 0x7a; // 8mb fast page mode
-#endif
} else { // Trio64 supported only up to 4M
vga.vmemsize = 4096*1024;
vga.s3.reg_36 = 0x1a; // 4mb fast page mode

View file

@ -7,7 +7,8 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"

View file

@ -7,7 +7,8 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"

View file

@ -7,7 +7,8 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"

View file

@ -34,5 +34,6 @@ DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_VOL_MODIFIER="BTN_MODE"
DEVICE_FUNC_KEYA_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TL2"
EOF

View file

@ -35,5 +35,6 @@ DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
#DEVICE_KEY_VOLUMEDOWN=
#DEVICE_KEY_VOLUMEUP=
DEVICE_VOL_MODIFIER="BTN_MODE"
DEVICE_FUNC_KEYA_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TL2"
EOF

View file

@ -36,5 +36,6 @@ DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_VOL_MODIFIER="BTN_MODE"
DEVICE_FUNC_KEYA_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TL2"
EOF

View file

@ -7,7 +7,8 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER=="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER=="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"

View file

@ -27,5 +27,6 @@ FAST_CORES="taskset -c 2-5"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_VOL_MODIFIER="BTN_MODE"
DEVICE_FUNC_KEYA_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TL2"
EOF

View file

@ -7,7 +7,8 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER=="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER=="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"

View file

@ -34,5 +34,6 @@ DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_VOL_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYA_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TL2"
EOF

View file

@ -34,5 +34,6 @@ DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_VOL_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYA_MODIFIER="BTN_TR2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TL2"
EOF

View file

@ -7,7 +7,8 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER=="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER=="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"

File diff suppressed because it is too large Load diff

View file

@ -24,7 +24,8 @@ VOL_EVENT='*(KEY_VOLUME*, value *' # This matches all volume events
VOL_UP='*UP), value *' # Differentiate 'up' volume event
VOL_DOWN='*DOWN), value *' #Differentiate 'down' volume event
V_FUNC_KEY_EVENT='*('${DEVICE_VOL_MODIFIER}'), value *'
V_FUNC_KEYA_EVENT='*('${DEVICE_FUNC_KEYA_MODIFIER}'), value *'
V_FUNC_KEYB_EVENT='*('${DEVICE_FUNC_KEYB_MODIFIER}'), value *'
# Matches if a button was pressed (1), released (0) or held down (2)
PRESS='value [1-9]'
@ -37,7 +38,8 @@ VOLUME_REPEAT_MOD=4
BRIGHTNESS_REPEAT_MOD=4
# Variable to keep track of Fn being currently pressed
FUNC_PRESSED=no
FUNCA_PRESSED=no
FUNCB_PRESSED=no
CONTROLLER_DISCONNECTED="*error reading: No such device"
DEVICE_DISCONNECTED="*error reading: No such device"
@ -122,15 +124,18 @@ mkcontroller 2>/dev/null ||:
REPEAT_NUM=0
continue
fi
# Setup for 'brightness' if Fn pressed
if [[ "${FUNC_PRESSED}" == "yes" ]]; then
COMMAND=/usr/bin/brightness
if [[ "${FUNCA_PRESSED}" == "yes" ]]; then
COMMAND="/usr/bin/brightness"
UP="up"
DOWN="down"
REPEAT_MOD=${BRIGHTNESS_REPEAT_MOD}
# Default to 'volume' if Fn is not pressed
elif [[ "${FUNCB_PRESSED}" == "yes" ]]; then
COMMAND="/usr/bin/say"
UP="-b"
DOWN="-b"
else
# Default to 'volume' if Fn a or b is not pressed
COMMAND="/usr/bin/system_utils vol"
UP="+"
DOWN="-"
@ -152,21 +157,36 @@ mkcontroller 2>/dev/null ||:
# Run the commands to adjust volume/brightness
if [[ "${line}" == ${VOL_UP} ]]; then
${COMMAND} ${UP} ${INCREMENT_AMOUNT} > /dev/null
read -t 0.1
elif [[ "${line}" == ${VOL_DOWN} ]]; then
${COMMAND} ${DOWN} ${INCREMENT_AMOUNT} > /dev/null
read -t 0.1
fi
;;
(${V_FUNC_KEY_EVENT})
(${V_FUNC_KEYA_EVENT})
#Reset the number of repeats when Fn is pressed/release
# as repeat speed is different between volume/brightness
REPEAT_NUM=0
if [[ "${line}" =~ ${PRESS} ]]; then
FUNC_PRESSED=yes
FUNCA_PRESSED=yes
elif [[ "${line}" =~ ${RELEASE} ]]; then
FUNC_PRESSED=no
FUNCA_PRESSED=no
fi
;;
(${V_FUNC_KEYB_EVENT})
#Reset the number of repeats when Fn is pressed/release
# as repeat speed is different between volume/brightness
REPEAT_NUM=0
if [[ "${line}" =~ ${PRESS} ]]; then
FUNCB_PRESSED=yes
elif [[ "${line}" =~ ${RELEASE} ]]; then
FUNCB_PRESSED=no
fi
;;
esac

View file

@ -19,6 +19,3 @@ BTN_BACK60S=${DEVICE_BTN_TL2}
BTN_KILL_HOTKEY=${DEVICE_BTN_TL}
BTN_KILL_SELECTA=${DEVICE_BTN_SELECT}
BTN_KILL_SELECTB=${DEVICE_BTN_START}
BTN_BAT_TL2=${DEVICE_BTN_TL2}
BTN_BAT_TR2=${DEVICE_BTN_TR2}
BTN_BAT_HOTKEY=${DEVICE_BTN_SELECT}

View file

@ -59,11 +59,6 @@ button1=${BTN_KILL_HOTKEY}
button2=${BTN_KILL_SELECTA}
button3=${BTN_KILL_SELECTB}
[BatteryPercent]
program="/usr/bin/say -b"
button1=${BTN_BAT_HOTKEY}
button2=${BTN_BAT_TL2}
button3=${BTN_BAT_TR2}
EOF
systemctl start jslisten
elif [ "$1" == "stop" ]

View file

@ -2,7 +2,7 @@ DEVICE_VOLUMECTL=true
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_VOL_MODIFIER="ABS_RZ"
DEVICE_FUNC_KEYA_MODIFIER="ABS_RZ"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"