Skip to content

Commit

Permalink
Fix compat settings and launch time saving for non-native games (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkashkin committed Nov 1, 2018
1 parent 3b3427e commit 75a5015
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/Game.vala
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace GameHub.Data

public string? store_page { get; protected set; default = null; }

public int64 last_launch { get; protected set; default = 0; }
public int64 last_launch { get; set; default = 0; }

public abstract async void install();
public abstract async void uninstall();
Expand Down
2 changes: 2 additions & 0 deletions src/ui/dialogs/CompatRunDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ namespace GameHub.UI.Dialogs
}
else
{
(game as Game).last_launch = get_real_time() / 1000;
game.save();
compat_tool_picker.selected.run.begin(game, (obj, res) => {
compat_tool_picker.selected.run.end(res);
RunnableIsLaunched = false;
Expand Down
2 changes: 2 additions & 0 deletions src/ui/widgets/CompatToolOptions.vala
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ namespace GameHub.UI.Widgets

public void save_options()
{
game.compat_options_saved = true;

if(compat_tool_picker == null || compat_tool_picker.selected == null) return;
var options = install ? compat_tool_picker.selected.install_options : compat_tool_picker.selected.options;
if(options == null) return;
Expand Down

0 comments on commit 75a5015

Please sign in to comment.