Add parameters: -w //Fullscreen mode

This commit is contained in:
red-prig 2023-01-22 01:17:20 +03:00
parent ba9583a301
commit 5e4581ec0b
2 changed files with 25 additions and 3 deletions

View File

@ -74,9 +74,10 @@ begin
Writeln('PS4 compatibility layer (emulator) written with Free Pascal '+{$I %FPCVERSION%});
Writeln(' Parameters:');
Writeln(' -e <name> //Decrypted ELF or SELF file name');
Writeln(' -f <name> //folder of app (/app0)');
Writeln(' -p <name> //folder of patch (/app1)');
Writeln(' -s <name> //savedata path');
Writeln(' -f <name> //Folder of app (/app0)');
Writeln(' -p <name> //Folder of patch (/app1)');
Writeln(' -s <name> //Savedata path');
Writeln(' -w //Fullscreen mode');
Writeln(' -h <name> //enable hack');
Writeln(' DEPTH_DISABLE_HACK //Disables depth buffer');
@ -99,6 +100,7 @@ begin
'-p':n:=2;
'-s':n:=3;
'-h':n:=4;
'-w':ps4_libSceVideoOut.FULLSCREEN_MODE:=True;
else
if (n<>-1) then
begin

View File

@ -242,6 +242,9 @@ type
flipArg:Int64;
end;
Var
FULLSCREEN_MODE:Boolean=false;
function _qc_sceVideoOutSubmitFlip(Flip:PqcFlipInfo):Integer;
var
@ -552,6 +555,17 @@ begin
end;
end;
procedure SetFullscreen(Handle:hwnd);
var
style:ptrint;
begin
style:=GetWindowLong(Handle,GWL_STYLE);
style:=style and (not WS_BORDER);
style:=style or WS_POPUP;
SetWindowLong(Handle,GWL_STYLE,style);
end;
procedure TVideoOut.OnVblank(Sender:TObject);
begin
post_event_vblank;
@ -595,6 +609,12 @@ begin
FForm.OnKeyDown:=@FForm.KeyEvent;
FForm.Position:=poScreenCenter;
if FULLSCREEN_MODE then
begin
FForm.WindowState:=wsFullScreen;
SetFullscreen(FForm.Handle);
end;
Application.UpdateMainForm(FForm);
FForm.Show;