Skip to content

Commit

Permalink
Add manual backup action and keybinding
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ziminsky committed Apr 30, 2017
1 parent 2a500d2 commit cb75b00
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Actions.def
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ ACTION(userTrigger, SDLOG(0, "==================================================
ACTION(reloadHUDVertices, RSManager::get().reloadHudVertices());

ACTION(togglePaused, RSManager::get().togglePaused());

ACTION(manualBackup, SaveManager::get().backup(time(NULL)););
2 changes: 2 additions & 0 deletions DATA/DSfixKeys.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ toggle30FPSLimit VK_BACK
#userTrigger VK_F1
#togglePaused VK_F9

manualBackup VK_F12

# Available Actions:
# toggleCursorVisibility, toggleCursorCapture, toggleBorderlessFullscreen, takeHudlessScreenshot, toggleHUD,
# toggleSMAA, toggleVSSAO, toggleDofGauss, toggleHudChange, reloadSSAOEffect, singleFrameFullCapture, userTrigger
Expand Down
1 change: 1 addition & 0 deletions KeyActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using namespace std;
#include "WindowManager.h"
#include "Settings.h"
#include "RenderstateManager.h"
#include "SaveManager.h"

KeyActions KeyActions::instance;

Expand Down
2 changes: 1 addition & 1 deletion SaveManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class SaveManager {
string getFileNameFromPath(const string& path);
vector<string> getSaveFiles(const char* ending = ".sl2");

void backup(const time_t curTime);
void removeOldBackups();

time_t getLastBackupTime();
Expand All @@ -35,5 +34,6 @@ class SaveManager {

void init();
void tick();
void backup(const time_t curTime);
};

0 comments on commit cb75b00

Please sign in to comment.