Merge pull request #1985 from brooksytech/dev

Add virtual touchscreen input to citra-sa
This commit is contained in:
Brooksytech 2023-08-28 14:37:53 -07:00 committed by GitHub
commit a910d9a5a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 1 deletions

View file

@ -0,0 +1,27 @@
back = \\
start = \\
a = \\
b = \\
x = \\
y = \\
l1 = \\
l2 = \\
l3 = \\
r1 = \\
r2 = \\
r3 = mouse_left
up = \\
down = \\
left = \\
right = \\
left_analog_up = \\
left_analog_down = \\
left_analog_left = \\
left_analog_right = \\
right_analog_up = mouse_movement_up
right_analog_down = mouse_movement_down
right_analog_left = mouse_movement_left
right_analog_right = mouse_movement_right
deadzone_triggers = 3000
mouse_scale = 4096
mouse_delay = 16

View file

@ -0,0 +1,27 @@
back = \\
start = \\
a = \\
b = \\
x = \\
y = \\
l1 = \\
l2 = \\
l3 = \\
r1 = \\
r2 = \\
r3 = mouse_left
up = \\
down = \\
left = \\
right = \\
left_analog_up = \\
left_analog_down = \\
left_analog_left = \\
left_analog_right = \\
right_analog_up = mouse_movement_up
right_analog_down = mouse_movement_down
right_analog_left = mouse_movement_left
right_analog_right = mouse_movement_right
deadzone_triggers = 3000
mouse_scale = 6128
mouse_delay = 16

View file

@ -6,7 +6,7 @@ PKG_VERSION="8d45390ed38fe82c50d788fe1ebbbfe86369b975"
PKG_LICENSE="MPLv2"
PKG_SITE="https://github.com/JustEnoughLinuxOS/citra-canary"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain ffmpeg mesa SDL2 boost zlib libusb boost zstd"
PKG_DEPENDS_TARGET="toolchain ffmpeg mesa SDL2 boost zlib libusb boost zstd control-gen"
PKG_LONGDESC="Citra 3DS emulator"
PKG_TOOLCHAIN="cmake"
GET_HANDLER_SUPPORT="git"

View file

@ -6,11 +6,21 @@
. /etc/profile
jslisten set "-9 citra"
#load gptokeyb support files
control-gen_init.sh
source /storage/.config/gptokeyb/control.ini
get_controls
if [ ! -d "/storage/.config/citra-emu" ]; then
mkdir -p "/storage/.config/citra-emu"
cp -r "/usr/config/citra-emu" "/storage/.config/"
fi
#Make sure citra gptk config exists
if [ ! -f "/storage/.config/citra-emu/citra.gptk" ]; then
cp -r "/usr/config/citra-emu/citra.gptk" "/storage/.config/citra-emu/citra.gptk"
fi
#Move sdmc & nand to 3ds roms folder
if [ ! -d "/storage/roms/3ds/citrasa/sdmc" ]; then
mkdir -p "/storage/roms/3ds/citrasa/sdmc"
@ -30,6 +40,7 @@ ln -sf /storage/roms/3ds/citrasa/nand /storage/.config/citra-emu/nand
#Emulation Station Features
GAME=$(echo "${1}"| sed "s#^/.*/##")
CPU=$(get_setting cpu_speed 3ds "${GAME}")
EMOUSE=$(get_setting emulate_mouse 3ds "${GAME}")
RENDERER=$(get_setting graphics_backend 3ds "${GAME}")
RES=$(get_setting resolution_scale 3ds "${GAME}")
ROTATE=$(get_setting rotate_screen 3ds "${GAME}")
@ -135,4 +146,11 @@ rm -rf /storage/.local/share/citra-emu
ln -sfv /storage/.config/citra-emu /storage/.local/share/citra-emu
#Run Citra Emulator
if [ "$EMOUSE" = "0" ]
then
/usr/bin/citra "${1}"
else
$GPTOKEYB "citra" -c "/storage/.config/citra-emu/citra.gptk" &
/usr/bin/citra "${1}"
kill -9 $(pidof gptokeyb)
fi

View file

@ -377,6 +377,10 @@
<choice name="60%" value="4"/>
<choice name="50%" value="5"/>
</feature>
<feature name="emulate mouse">
<choice name="yes" value="1"/>
<choice name="no" value="0"/>
</feature>
<feature name="graphics backend">
<choice name="opengl" value="1"/>
<choice name="vulkan" value="2"/>