working flatpak
Some checks failed
Linux arm64 / Build (push) Failing after 1m47s

This commit is contained in:
2025-07-24 14:54:26 +02:00
parent 161c9425ae
commit 19d953891b
14 changed files with 120 additions and 155 deletions

View File

@@ -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) {