mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
動作完了後2秒後にシャットダウンするように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@338 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
b6024ff808
commit
cda6a61a72
@ -1,5 +1,6 @@
|
|||||||
BasicInfo:
|
BasicInfo:
|
||||||
Title: SelfCup
|
Title: SelfCup
|
||||||
|
ProductCode: CTR-P-234A
|
||||||
BackupMemoryType: None
|
BackupMemoryType: None
|
||||||
Logo: Nintendo
|
Logo: Nintendo
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
#include <nn/am.h>
|
#include <nn/am.h>
|
||||||
#include <nn/ndm.h>
|
#include <nn/ndm.h>
|
||||||
#include <nn/cfg.h>
|
#include <nn/cfg.h>
|
||||||
|
#include <nn/ptm_Private.h>
|
||||||
|
|
||||||
#include <nn/cup.h>
|
#include <nn/cup.h>
|
||||||
|
|
||||||
@ -280,8 +281,16 @@ extern "C" void nnMain()
|
|||||||
|
|
||||||
s_scrollBuffer->AppendText("")->Render();
|
s_scrollBuffer->AppendText("")->Render();
|
||||||
|
|
||||||
|
nn::os::Tick before = nn::os::Tick::GetSystemCurrent();
|
||||||
|
const u8 SHUTDOWN_WAIT_SECONDS = 2;
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
nn::os::Tick current = nn::os::Tick::GetSystemCurrent();
|
||||||
|
if((current - before).ToTimeSpan().GetSeconds() > SHUTDOWN_WAIT_SECONDS)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
s_RenderSystem.SetRenderTarget(NN_GX_DISPLAY0);
|
s_RenderSystem.SetRenderTarget(NN_GX_DISPLAY0);
|
||||||
if(result.IsSuccess() || result == nn::cup::CTR::ResultUpdateNotRequired())
|
if(result.IsSuccess() || result == nn::cup::CTR::ResultUpdateNotRequired())
|
||||||
{
|
{
|
||||||
@ -309,6 +318,8 @@ extern "C" void nnMain()
|
|||||||
nn::applet::PrepareToCloseApplication();
|
nn::applet::PrepareToCloseApplication();
|
||||||
nn::applet::CloseApplication();
|
nn::applet::CloseApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nn::ns::ShutdownAsync();
|
||||||
|
nn::ns::FinalizeForShell();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user