Commit c86148cd authored by Andrei Lisita's avatar Andrei Lisita 🎮

savestates-list: Save proper thumbnail when closing window

parent 99e9660a
Pipeline #103916 passed with stages
in 13 minutes and 54 seconds
......@@ -53,9 +53,6 @@ public class Games.CommandRunner : Object, Runner {
return null;
}
public void capture_current_state_pixbuf () {
}
public void preview_current_state () {
}
......
......@@ -19,12 +19,10 @@ public interface Games.Runner : Object {
public abstract void pause ();
public abstract void stop ();
public abstract void capture_current_state_pixbuf ();
public abstract void preview_current_state ();
public abstract Savestate? try_create_savestate (bool is_automatic);
public abstract void delete_savestate (Savestate savestate);
public abstract void preview_savestate (Savestate savestate);
public abstract void preview_current_state ();
public abstract void load_previewed_savestate () throws Error;
public abstract Savestate[] get_savestates ();
......
......@@ -40,9 +40,6 @@ private class Games.DummyRunner : Object, Runner {
return null;
}
public void capture_current_state_pixbuf () {
}
public void preview_current_state () {
}
......
......@@ -348,6 +348,10 @@ public class Games.RetroRunner : Object, Runner {
if (!is_initialized)
return;
if (!running)
return;
current_state_pixbuf = view.get_pixbuf ();
loop.stop ();
//FIXME:
......
......@@ -365,8 +365,6 @@ private class Games.DisplayView : Object, UiView {
return true;
}
box.runner.capture_current_state_pixbuf ();
if (box.runner.try_create_savestate (true) != null) {
// Progress saved => can quit game safely
box.runner.stop ();
......
......@@ -114,9 +114,7 @@ private class Games.SavestatesList : Gtk.Box {
revealer.reveal_child = state.is_revealed;
if (state.is_revealed) {
runner.capture_current_state_pixbuf ();
runner.pause ();
select_savestate_row (null);
}
// Runner isn't resumed here but after the revealer finishes the transition
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment