]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
fix some confusion with star placement in fedora-fade-in plugin
authorRay Strode <rstrode@redhat.com>
Wed, 14 May 2008 12:59:33 +0000 (08:59 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 14 May 2008 12:59:33 +0000 (08:59 -0400)
We did logo_width - frame_buffer_width instead of the other way
around, so we ended up with a negative width

src/splash-plugins/fedora-fade-in/fedora-fade-in.c

index 8d0d45d53c0f3575f643666f084333b8349563b0..0d6b926219469408330f9a200cef73d204119fc7 100644 (file)
@@ -406,15 +406,14 @@ add_star (ply_boot_splash_plugin_t *plugin)
 
   assert (plugin != NULL);
 
-  ply_frame_buffer_get_size (plugin->frame_buffer, &logo_area);
+  ply_frame_buffer_get_size (plugin->frame_buffer, &area);
   width = ply_image_get_width (plugin->logo_image);
   height = ply_image_get_height (plugin->logo_image);
-  logo_area.x = (width / 2) - (logo_area.width / 2);
-  logo_area.y = (height / 2) - (logo_area.height / 2);
+  logo_area.x = (area.width / 2) - (width / 2);
+  logo_area.y = (area.height / 2) - (height / 2);
   logo_area.width = width;
   logo_area.height = height;
 
-  ply_frame_buffer_get_size (plugin->frame_buffer, &area);
   width = ply_image_get_width (plugin->star_image);
   height = ply_image_get_height (plugin->star_image);