Skip to content
Permalink
Browse files

Merge pull request #2774 from psyke83/yquake2_fkms

runcommand KMS x/y res support & yquake2 update
  • Loading branch information...
joolswills committed Jul 12, 2019
2 parents 77f2d29 + e3e545c commit 135efb0a299f527943798f99260fa3b139d3bf14
Showing with 15 additions and 2 deletions.
  1. +11 −2 scriptmodules/ports/yquake2.sh
  2. +4 −0 scriptmodules/supplementary/runcommand/runcommand.sh
@@ -85,14 +85,23 @@ function game_data_yquake2() {

function configure_yquake2() {
local params=()
if isPlatform "gles"; then

if isPlatform "x11"; then
params+=("+set vid_renderer gl3")
elif isPlatform "mesa"; then
params+=("+set vid_renderer gl1")
else
params+=("+set vid_renderer soft")
fi

if isPlatform "kms"; then
params+=("+set r_mode -1" "+set r_customwidth %XRES%" "+set r_customheight %YRES%")
fi

mkRomDir "ports/quake2"

moveConfigDir "$home/.yq2" "$md_conf_root/quake2/yquake2"

[[ "$md_mode" == "install" ]] && game_data_yquake2
add_games_yquake2 "$md_inst/quake2 -datadir $romdir/ports/quake2 ${params[@]} +set game %ROM%"
add_games_yquake2 "$md_inst/quake2 -datadir $romdir/ports/quake2 ${params[*]} +set game %ROM%"
}
@@ -1045,6 +1045,10 @@ function runcommand() {

mode_switch "$MODE_REQ_ID"

# replace X/Y resolution (needed for KMS applications)
COMMAND="${COMMAND//\%XRES\%/${MODE_CUR[0]}}"
COMMAND="${COMMAND//\%YRES\%/${MODE_CUR[1]}}"

[[ -n "$FB_NEW" ]] && switch_fb_res $FB_NEW

config_dispmanx "$SAVE_EMU"

0 comments on commit 135efb0

Please sign in to comment.
You can’t perform that action at this time.