Code: Select all
!BOXX-LIB.BAT has
CALL :%1 %*
EXIT /B
:WhichResScaler
(@ECHO OFF
Setlocal EnableDelayedExpansion
REM 3 IN, 3 OUT - Which resolution Scaler?
SET VAR1=!%2!
SET VAR2=!%3!
SET VAR3=!%4!
REM --------------------
IF /I !VAR1!==0 SET WW=windowresolution=
IF /I !VAR1!==1 SET WW=windowresolution=800x600
IF /I !VAR1!==2 SET WW=windowresolution=867x650
IF /I !VAR1!==3 SET WW=windowresolution=1024x768
IF /I !VAR1!==4 SET WW=windowresolution=1200x900
IF /I !VAR1!==5 SET WW=windowresolution=1256x947
IF /I !VAR1!==O SET WW=windowresolution=original
SET W11=!WW!
IF /I !VAR2!==0 SET WW=windowresolution=
IF /I !VAR2!==1 SET WW=windowresolution=800x600
IF /I !VAR2!==2 SET WW=windowresolution=867x650
IF /I !VAR2!==3 SET WW=windowresolution=1024x768
IF /I !VAR2!==4 SET WW=windowresolution=1200x900
IF /I !VAR2!==5 SET WW=windowresolution=1256x947
IF /I !VAR2!==O SET WW=windowresolution=original
SET W12=!WW!
REM --------------------
SET WW=scaler=!VAR3!
IF /I !VAR3!==1 SET WW=scaler=normal2x
IF /I !VAR3!==2 SET WW=scaler=normal3x
IF /I !VAR3!==3 SET WW=scaler=advinterp2x
IF /I !VAR3!==4 SET WW=scaler=advmame2x
IF /I !VAR3!==5 SET WW=scaler=hq2x
SET W21=!WW!
)
(Endlocal
SET %5=%W11%
SET %6=%W12%
SET %7=%W21%
)
EXIT /B
Code: Select all
!BOXX-LIB - WhichResScaler.BAT has
@ECHO OFF
SET V1=%1
SET V2=%2
SET V3=%3
CALL "C:\DOSBox-X\!BOXX-LIB.BAT" :WhichResScaler V1 V1 V2 W11 W12 W21
ECHO.
ECHO inputs
ECHO %V1% %V2% %V3%
ECHO.
ECHO outputs
ECHO %W11%
ECHO %W12%
ECHO %W21%
ECHO.
PAUSE
Code: Select all
!BOXX-LIB - WhichResScaler - RUN.BAT has
CALL "!BOXX-LIB - WhichResScaler.BAT" 3 4 2
windowresolution=1024x768
windowresolution=1200x900
scaler=normal3x
but instead it gives me the wrong answers as below
windowresolution=1024x768
windowresolution=1024x768
scaler=advmame2x
please let me know what i am doing wrong, this batch is a little urgent to me to finish 100's DOS game batch files.