This commit is contained in:
Pavel 2024-10-18 18:29:44 +03:00
parent e43826e699
commit 4a15d847a2
4 changed files with 52 additions and 3 deletions

View File

@ -347,7 +347,11 @@ begin
begin begin
if (MessageDlgEx(PChar(buf),mtError,[mbOK,mbAbort],Form)=mrAbort) then if (MessageDlgEx(PChar(buf),mtError,[mbOK,mbAbort],Form)=mrAbort) then
begin begin
Form.TBStopClick(nil); if (Form.FGameProcess<>nil) then
if (Form.FGameProcess.g_ipc<>nil) then
begin
Form.FGameProcess.g_ipc.FStop:=True;
end;
end; end;
end end
else; else;
@ -829,7 +833,8 @@ begin
end; end;
if (FGameProcess.g_ipc<>nil) then //recheck, must be free in Update() if (FGameProcess.g_ipc<>nil) then //recheck, must be free in Update()
if FGameProcess.is_terminated then if (FGameProcess.is_terminated) or
(FGameProcess.g_ipc.FStop) then
begin begin
TBStopClick(Sender); TBStopClick(Sender);
end; end;

View File

@ -236,6 +236,12 @@ type
reserved :QWORD; reserved :QWORD;
end; end;
pSceVideoOutColorSettings=^SceVideoOutColorSettings;
SceVideoOutColorSettings=packed record
gamma :array[0..2] of Single;
option:DWORD;
end;
type type
p_cursor_enable=^t_cursor_enable; p_cursor_enable=^t_cursor_enable;
t_cursor_enable=packed record t_cursor_enable=packed record
@ -391,6 +397,7 @@ var
1:(f_status:t_flip_status); 1:(f_status:t_flip_status);
2:(i_scaler:t_scaler_info); 2:(i_scaler:t_scaler_info);
3:(v_vblank:t_vblank_args); 3:(v_vblank:t_vblank_args);
4:(color :SceVideoOutColorSettings)
end; end;
begin begin
Result:=0; Result:=0;
@ -797,7 +804,37 @@ begin
if (data^.arg3>13) then Exit(EINVAL); if (data^.arg3>13) then Exit(EINVAL);
Writeln('dce_flip_control(',data^.id,'):',data^.arg3,' 0x',HexStr(data^.arg4,16)); Writeln('dce_flip_control(',data^.id,'):',data^.arg3,' 0x',HexStr(data^.arg4,10));
end;
33: //sceVideoOutAdjustColor_
begin
//arg2 -> canary
//arg3 -> pSetting;
//arg4 -> size;
if (data^.arg2<>$a5a5) then Exit(EINVAL);
ptr:=Pointer(data^.arg3);
len:=data^.arg4;
if (len<>16) and (len<>12) then Exit(EINVAL);
u.color:=Default(SceVideoOutColorSettings);
if (len<>12) then
begin
u.color.option:=$ffffffff;
end;
Result:=copyin(ptr,@u.color,len);
if (Result<>0) then Exit;
Writeln('sceVideoOutAdjustColor(',u.color.gamma[0]:0:2,',',
u.color.gamma[1]:0:2,',',
u.color.gamma[2]:0:2,',0x',HexStr(u.color.option,8)+')');
Exit(0);
end; end;
else else

View File

@ -248,6 +248,8 @@ var
node:PQNode; node:PQNode;
value:Ptruint; value:Ptruint;
begin begin
if FStop then Exit;
node:=Recv; node:=Recv;
while (node<>nil) do while (node<>nil) do
@ -263,6 +265,8 @@ begin
begin begin
value:=Handler.OnMessage(t_mtype(node^.header.mtype),node^.header.mlen,@node^.buf); value:=Handler.OnMessage(t_mtype(node^.header.mtype),node^.header.mlen,@node^.buf);
if FStop then Exit;
//is sync //is sync
if (node^.header.mtid<>0) then if (node^.header.mtid<>0) then
begin begin
@ -275,6 +279,8 @@ begin
// //
FreeMem(node); //RenderDoc -> ExceptionCode:0xC0000005 FreeMem(node); //RenderDoc -> ExceptionCode:0xC0000005
// //
if FStop then Exit;
//
node:=Recv; node:=Recv;
end; end;
end; end;

View File

@ -25,6 +25,7 @@ type
THostIpcInterface=class THostIpcInterface=class
public public
Ftd:Pointer; //p_kthread Ftd:Pointer; //p_kthread
FStop:Boolean;
// //
procedure error(const s:RawByteString); procedure error(const s:RawByteString);
procedure kevent(kev:p_kevent;count:Integer); procedure kevent(kev:p_kevent;count:Integer);