Skip to content

Commit de69fe1

Browse files
committed
Show splash screen image on reboot and halt.
1 parent 552ea03 commit de69fe1

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1414
- Replace HTML tables with markdown tables in README files.
1515
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
1616
- Run `npm test` on Travis automatically
17+
- Show the splash screen image even when is reboot or halted.
1718

1819
### Added
1920
- Add loaded function to modules, providing an async callback.

Diff for: splashscreen/MagicMirror.script

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
screen_width = Window.GetWidth();
22
screen_height = Window.GetHeight();
33

4-
theme_image = Image("splash.png");
4+
if (Plymouth.GetMode() != "shutdown")
5+
{
6+
theme_image = Image("splash.png");
7+
}
8+
else
9+
{
10+
theme_image = Image("splash_halt.png");
11+
}
12+
513
image_width = theme_image.GetWidth();
614
image_height = theme_image.GetHeight();
715

@@ -30,11 +38,8 @@ else
3038
image_y = (screen_height - image_height) / 2;
3139
}
3240

33-
if (Plymouth.GetMode() != "shutdown")
34-
{
35-
sprite = Sprite (resized_image);
36-
sprite.SetPosition (image_x, image_y, -100);
37-
}
41+
sprite = Sprite (resized_image);
42+
sprite.SetPosition (image_x, image_y, -100);
3843

3944
message_sprite = Sprite();
4045
message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.9, 10000);

Diff for: splashscreen/splash_halt.png

21.8 KB
Loading

0 commit comments

Comments
 (0)