mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
ロゴ表示が完了してからエラー表示アプレットを呼ぶように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@468 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
120532553a
commit
33771ff869
@ -56,9 +56,6 @@ nn::os::StackBuffer<DRAWER_STACK_SIZE> s_DrawerThreadStack;
|
||||
// 終了処理をしても良いかどうか
|
||||
bool s_IsExpectedToFinalize = false;
|
||||
|
||||
// 終了処理が完了したかどうか
|
||||
bool s_IsPreparedToFinalize = false;
|
||||
|
||||
// エラーコード表示が必要かどうか
|
||||
bool s_NeedShowErrorCode = false;
|
||||
// エラーコード
|
||||
@ -425,13 +422,12 @@ void StartDrawerThread()
|
||||
s_DrawerThread.Start(DrawThreadMain, s_DrawerThreadStack);
|
||||
}
|
||||
|
||||
bool IsDrawerThreadFinished()
|
||||
{
|
||||
return s_IsPreparedToFinalize;
|
||||
}
|
||||
|
||||
void FinalizeDrawerThread()
|
||||
{
|
||||
if(s_DrawerThread.IsAlive())
|
||||
{
|
||||
nn::os::Thread::Sleep(nn::fnd::TimeSpan::FromMilliSeconds(0));
|
||||
}
|
||||
s_DrawerThread.Join();
|
||||
s_DrawerThread.Finalize();
|
||||
}
|
||||
@ -452,6 +448,7 @@ void NotifyFailed(s32 error)
|
||||
void NotifyFinished()
|
||||
{
|
||||
s_IsExpectedToFinalize = true;
|
||||
s_NeedShowErrorCode = false;
|
||||
}
|
||||
|
||||
void ShowError()
|
||||
@ -568,7 +565,8 @@ DrawThreadMain()
|
||||
pUpperLayoutAnim = &layoutAnim[upperLayoutAnimIndex.layoutType];
|
||||
pLowerLayoutAnim = &layoutAnim[lowerLayoutAnimIndex.layoutType];
|
||||
|
||||
nn::os::Tick startTick = nn::os::Tick::GetSystemCurrent();
|
||||
// ロゴ表示中の待ちフレーム数をカウント
|
||||
u32 waitCounter = 0;
|
||||
while (mainloop)
|
||||
{
|
||||
padReader.ReadLatest(&padStatus);
|
||||
@ -598,6 +596,7 @@ DrawThreadMain()
|
||||
{
|
||||
const nw::ut::FloatColor white(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
demoApp.GetFrameBufferObject().ClearBuffer(white, clearDepth);
|
||||
waitCounter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -678,18 +677,15 @@ DrawThreadMain()
|
||||
|
||||
demoApp.SwapBuffer(demoApp.DISPLAY_BOTH);
|
||||
|
||||
if(s_NeedShowErrorCode && DRAW_STATE_LOGO_DRAW <= drawState)
|
||||
// ロゴが表示されてからエラー表示を行う
|
||||
if(s_NeedShowErrorCode && DRAW_STATE_LOGO_DRAW == drawState && 1 < waitCounter)
|
||||
{
|
||||
if((nn::os::Tick::GetSystemCurrent() - startTick).ToTimeSpan().GetSeconds() > 1)
|
||||
{
|
||||
ShowError();
|
||||
}
|
||||
ShowError();
|
||||
}
|
||||
}
|
||||
|
||||
delete pResAccessor;
|
||||
|
||||
demoApp.GetDeviceAllocator().Free(fileLayout.Buffer());
|
||||
s_IsPreparedToFinalize = true;
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
#define DRAWER_H_
|
||||
|
||||
void StartDrawerThread();
|
||||
bool IsDrawerThreadFinished();
|
||||
void FinalizeDrawerThread();
|
||||
void NotifyFailed(s32 error);
|
||||
void NotifyFinished();
|
||||
|
||||
@ -201,7 +201,7 @@ extern "C" void nnMain()
|
||||
// 画面描画
|
||||
if (result.IsSuccess() || result == nn::cup::CTR::ResultUpdateNotRequired())
|
||||
{
|
||||
// TODO:成功したので終了処理に入る
|
||||
// 成功したので終了処理に入る
|
||||
nn::os::Tick current = nn::os::Tick::GetSystemCurrent();
|
||||
if ((current - before).ToTimeSpan().GetSeconds() > SHUTDOWN_WAIT_SECONDS)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user