2022-06-05 04:05:04 +03:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-05-16 17:51:33 +03:00
|
|
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
|
|
|
Date: Wed, 16 Jun 2021 11:23:34 +0200
|
2022-06-05 04:05:04 +03:00
|
|
|
Subject: [PATCH] chdir() to the resource install path at program startup
|
2022-05-16 17:51:33 +03:00
|
|
|
|
|
|
|
The game tries to open its resource files using relative paths, and we
|
2023-05-06 17:40:21 +03:00
|
|
|
install them into /opt, so chdir() there.
|
2022-05-16 17:51:33 +03:00
|
|
|
---
|
|
|
|
src/main.c | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/src/main.c b/src/main.c
|
2023-05-06 17:40:21 +03:00
|
|
|
index 8fa842f951fa2cd0a365623d1b6650c536695f59..e16c35e81cc94af006dbb63b0329a60750bd6846 100644
|
2022-05-16 17:51:33 +03:00
|
|
|
--- a/src/main.c
|
|
|
|
+++ b/src/main.c
|
|
|
|
@@ -12,6 +12,8 @@
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int main(int argc, char** args) {
|
|
|
|
+ // The game tries to open its resource files using relative paths
|
|
|
|
+ chdir("/opt/DungeonRush");
|
|
|
|
prngSrand(time(NULL));
|
|
|
|
// Start up SDL and create window
|
|
|
|
if (!init()) {
|