projects
/
fbgfx
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
transitions
[fbgfx]
/
src
/
screen.c
diff --git
a/src/screen.c
b/src/screen.c
index
1f1dfbe
..
ff88268
100644
(file)
--- a/
src/screen.c
+++ b/
src/screen.c
@@
-45,6
+45,7
@@
void scr_update(void)
if(prev) { /* we're in the middle of a transition */
long interval = time_msec - trans_start;
if(interval >= trans_dur) {
if(prev) { /* we're in the middle of a transition */
long interval = time_msec - trans_start;
if(interval >= trans_dur) {
+ next->start(trans_dur);
prev = 0;
cur = next;
next = 0;
prev = 0;
cur = next;
next = 0;
@@
-70,16
+71,23
@@
struct screen *scr_lookup(const char *name)
int scr_change(struct screen *s, long trans_time)
{
int scr_change(struct screen *s, long trans_time)
{
+ if(!s) return -1;
if(s == cur) return 0;
if(trans_time && cur) {
trans_dur = trans_time / 2; /* half for each part transition out then in */
trans_start = time_msec;
if(s == cur) return 0;
if(trans_time && cur) {
trans_dur = trans_time / 2; /* half for each part transition out then in */
trans_start = time_msec;
+ if(cur) cur->stop(trans_dur);
+
prev = cur;
next = s;
} else {
prev = cur;
next = s;
} else {
+ if(cur) cur->stop(0);
+ s->start(0);
+
cur = s;
cur = s;
+ prev = 0;
}
return 0;
}
}
return 0;
}