This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <set>
|
||||
#include <fstream>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "../Utils/AssetManager.h"
|
||||
|
||||
|
||||
Keybinds::Keybinds(int layoutNumber) :
|
||||
@@ -20,7 +21,7 @@ Keybinds::Keybinds(int layoutNumber) :
|
||||
}
|
||||
|
||||
void Keybinds::loadKeybindsFromFile() {
|
||||
std::ifstream layoutFile("data/config/keybinds/layout" + std::to_string(this->layoutNumber) + ".bin", std::ios::binary);
|
||||
std::ifstream layoutFile(AssetManager::getResourcePath("data/config/keybinds/layout" + std::to_string(this->layoutNumber) + ".bin"), std::ios::binary);
|
||||
|
||||
for (Action action : ACTION_LIST_IN_ORDER) {
|
||||
this->keybinds.at(action).clear();
|
||||
@@ -47,7 +48,7 @@ void Keybinds::loadKeybindsFromFile() {
|
||||
void Keybinds::saveKeybindsToFile() const {
|
||||
if (!this->modifiable) return;
|
||||
|
||||
std::ofstream layoutFile("data/config/keybinds/layout" + std::to_string(this->layoutNumber) + ".bin", std::ios::trunc | std::ios::binary);
|
||||
std::ofstream layoutFile(AssetManager::getResourcePath("data/config/keybinds/layout" + std::to_string(this->layoutNumber) + ".bin"), std::ios::trunc | std::ios::binary);
|
||||
|
||||
char byte;
|
||||
for (Action action : ACTION_LIST_IN_ORDER) {
|
||||
|
||||
Reference in New Issue
Block a user