ladybird/Ports/dungeonrush/patches/0001-chdir-to-the-resource-install-path-at-program-startu.patch
2023-05-07 01:05:09 +02:00

25 lines
810 B
Diff

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