4 procedure initVideo(scrW
, scrH
:integer; canScale
:boolean;);
12 procedure initVideo(scrW
, scrH
:integer; canScale
:boolean;);
19 if (getWidth
>getHeight
) and (scrW
<scrH
) then
26 if ((getWidth
>scrW
) and (getHeight
>scrH
)) or ((getHeight
>scrW
) and (getWidth
>scrH
)) then
28 debug('Scaling: '+getWidth
+'x'+getHeight
+' -> '+scrW
+'x'+scrH
);
29 if getWidth
<getHeight
then
30 scrH
:=getHeight
/(getWidth
/scrW
);
32 scrW
:=getWidth
/(getHeight
/scrH
);
34 scrH
:=getHeight
/(getWidth
/scrW
);
35 scrW
:=getWidth
/(getHeight
/scrH
);
37 debug('Scaling result: '+getWidth
+'x'+getHeight
+' -> '+scrW
+'x'+scrH
);
39 ScriCreate(scrW
, scrH
);
42 keyboard
.scrMulX
:=getWidth
/scrW
;
43 keyboard
.scrMulY
:=getHeight
/scrH
;
44 ScriScale(getWidth
/scrW
, getHeight
/scrH
);