Skip to content

Commit

Permalink
refs ignore bug fix
Browse files Browse the repository at this point in the history
* 再生中にモダンスタンバイに入るとフリーズすることがある不具合を修正
  • Loading branch information
dgrfactory committed Feb 11, 2023
1 parent 0f088e9 commit 41af00c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions spcplay.exe/spcplay.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,9 @@ const
CBS_SORT = $100;
CBS_UPPERCASE = $2000;
CW_USEDEFAULT = -2147483648;
DEVICE_NOTIFY_CALLBACK = $2;
DEVICE_NOTIFY_SERVICE_HANDLE = $1;
DEVICE_NOTIFY_WINDOW_HANDLE = $0;
DS_3DLOOK = $4;
DS_ABSALIGN = $1;
DS_CENTER = $800;
Expand Down Expand Up @@ -5118,6 +5121,7 @@ var
hWndApp: longword;
hFontApp: longword;
Box: TBOX;
API_RegisterSuspendResumeNotification: function(hRecipient: longword; flags: longword): longword; stdcall;
API_RtlGetVersion: function(lpVersionInfo: pointer): longbool; stdcall;
{$IFDEF UACDROP}
API_ChangeWindowMessageFilter: function(msg: longword; dwFlag: longword): longword; stdcall;
Expand Down Expand Up @@ -5657,19 +5661,24 @@ begin
IID_ITaskbarList3.DataX[2] := $9F9EE990;
IID_ITaskbarList3.DataX[3] := $AFEF5E8A;
{$ENDIF}
{$IFDEF UACDROP}
// �������Ⴂ�A�v���P�[�V��������̃h���b�v��L���ɐݒ� (for Windows Vista, 7)
dwBuffer := API_LoadLibrary(pchar('user32.dll'));
if longbool(dwBuffer) then begin
// S0 (�ȓd��) �X���[�v�̃C�x���g���E����悤�ɐݒ� (for Windows 8, 8.1, 10, 11)
@API_RegisterSuspendResumeNotification := API_GetProcAddress(dwBuffer, pchar('RegisterSuspendResumeNotification'));
if longbool(@API_RegisterSuspendResumeNotification) then begin
API_RegisterSuspendResumeNotification(hWndApp, DEVICE_NOTIFY_WINDOW_HANDLE);
end;
{$IFDEF UACDROP}
// �������Ⴂ�A�v���P�[�V��������̃h���b�v��L���ɐݒ� (for Windows Vista, 7)
@API_ChangeWindowMessageFilter := API_GetProcAddress(dwBuffer, pchar('ChangeWindowMessageFilter'));
if longbool(@API_ChangeWindowMessageFilter) then begin
API_ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);
API_ChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD);
API_ChangeWindowMessageFilter(WM_COPYGLOBALDATA, MSGFLT_ADD);
end;
{$ENDIF}
API_FreeLibrary(dwBuffer);
end;
{$ENDIF}
// �V�X�e���̃o�[�W���������擾
Status.OsVersionInfo.dwOSVersionInfoSize := SizeOf(TOSVERSIONINFO);
API_GetVersionEx(@Status.OsVersionInfo);
Expand Down Expand Up @@ -9215,6 +9224,7 @@ var
procedure CacheSeek();
var
SPCCache: ^TSPCCACHE;
SPCOutPortCopy: ^TSPCPORT;
begin
if not longbool(T64Cache) then begin
// �L���b�V�����Ȃ��ꍇ�͍ŏ��̃o�b�t�@��ǂݍ���
Expand All @@ -9226,6 +9236,8 @@ begin
Apu.LoadSPCFile(@SPCCache.Spc);
API_MoveMemory(Status.Script700.Data, @SPCCache.Script700, SizeOf(TSCRIPT700EX));
Apu.SPCOutPort.dwPort := SPCCache.SPCOutPort.dwPort;
SPCOutPortCopy := pointer(longword(Apu.SPCOutPort) + 8);
SPCOutPortCopy.dwPort := Apu.SPCOutPort.dwPort;
Apu.T64Count^ := T64Cache;
T64Count := T64Cache;
end;
Expand Down

0 comments on commit 41af00c

Please sign in to comment.