Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
4TU
hb-appstore
Commits
ec48919b
Commit
ec48919b
authored
Dec 06, 2020
by
vgmoose
🌱
Browse files
wiiu: fix re-rendering after home menu resume callback
parent
4032e9e7
Pipeline
#226012836
passed with stage
in 4 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
29 deletions
+22
-29
gui/main.cpp
gui/main.cpp
+21
-28
libs/chesto
libs/chesto
+1
-1
No files found.
gui/main.cpp
View file @
ec48919b
...
...
@@ -39,28 +39,13 @@ void quit()
}
#ifdef __WIIU__
bool
CheckRunning
(){
switch
(
ProcUIProcessMessages
(
true
))
{
case
PROCUI_STATUS_EXITING
:
{
return
false
;
}
case
PROCUI_STATUS_RELEASE_FOREGROUND
:
{
ProcUIDrawDoneRelease
();
break
;
}
case
PROCUI_STATUS_IN_FOREGROUND
:
{
break
;
}
case
PROCUI_STATUS_IN_BACKGROUND
:
default:
break
;
}
return
true
;
// proc ui will block if it keeps control
void
processWiiUHomeOverlay
()
{
auto
status
=
ProcUIProcessMessages
(
true
);
if
(
status
==
PROCUI_STATUS_EXITING
)
exit
(
0
);
else
if
(
status
==
PROCUI_STATUS_RELEASE_FOREGROUND
)
ProcUIDrawDoneRelease
();
}
#endif
...
...
@@ -141,18 +126,26 @@ int main(int argc, char* argv[])
DownloadQueue
::
init
();
events
->
quitaction
=
quit
;
#ifdef __WIIU__
// setup procui callback for resuming application to force a chesto render
// https://stackoverflow.com/a/56145528 and http://bannalia.blogspot.com/2016/07/passing-capturing-c-lambda-functions-as.html
auto
updateDisplay
=
+
[](
void
*
display
)
->
unsigned
int
{
((
MainDisplay
*
)
display
)
->
futureRedrawCounter
=
10
;
return
0
;
};
ProcUIRegisterCallback
(
PROCUI_CALLBACK_ACQUIRE
,
updateDisplay
,
display
,
100
);
#endif
while
(
running
)
{
#ifdef __WIIU__
if
(
!
CheckRunning
()){
exit
(
0
);
break
;
}
#endif
bool
atLeastOneNewEvent
=
false
;
bool
viewChanged
=
false
;
#ifdef __WIIU__
processWiiUHomeOverlay
();
#endif
int
frameStart
=
CST_GetTicks
();
// update download queue
...
...
chesto
@
8bdda8ed
Compare
202ebe9f
...
8bdda8ed
Subproject commit
202ebe9f3cfed6aaf44bdb0421ce4ac7214474ca
Subproject commit
8bdda8ed6cca5ad6046b8d3b09a6b7619c350c4d
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment