ladybird/Ports/dungeonrush/patches/0001-chdir-to-the-resource-install-path-at-program-startu.patch

25 lines
810 B
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gbeutner@serenityos.org>
Date: Wed, 16 Jun 2021 11:23:34 +0200
Subject: [PATCH] chdir() to the resource install path at program startup
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.
---
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
--- 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()) {