]> git.draconx.ca Git - liblbx.git/blobdiff - src/gui/lbxgui.c
liblbx: Expose image lead-in in public struct.
[liblbx.git] / src / gui / lbxgui.c
index 9afcaa85e69b6f67e812a16fb18179b6b7da576a..bb9e5e5664459c2ce9b06249f204adf55f80bb44 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  2ooM: The Master of Orion II Reverse Engineering Project
  *  Graphical tool for inspecting LBX archives.
- *  Copyright (C) 2010 Nick Bowler
+ *  Copyright (C) 2010, 2014 Nick Bowler
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -100,12 +100,12 @@ static void tick(void *p, double delta)
                elapsed -= seconds_per_frame;
 
                if (++newframe >= image->frames) {
-                       if (!info.looping) {
+                       if (image->leadin == image->frames - 1) {
                                gtk_toggle_button_set_active(play, FALSE);
                                break;
                        }
 
-                       newframe = info.loopstart;
+                       newframe = image->leadin;
                }
        }