python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / games / beret / use-home-dir.patch
blobc8597a0303b8ada6625235370052381fbce702ed
1 diff -Naur beret-beret-orig/game.c beret-beret/game.c
2 --- beret-beret-orig/game.c 2011-12-17 18:51:32.000000000 -0500
3 +++ beret-beret/game.c 2011-12-21 13:16:37.047511020 -0500
4 @@ -10,12 +10,10 @@
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <string.h>
8 -#ifdef __APPLE__
9 #include <sys/stat.h>
10 #include <unistd.h>
11 #include <errno.h>
12 #include <pwd.h>
13 -#endif
15 #define CAMSCROLL 15
16 #define SCR_WIDTH 780
17 @@ -88,12 +86,8 @@
18 #define DIRSEP "/"
19 #endif
21 -#ifdef __APPLE__
22 -#define SUPPORT_PATH "Library/Application Support/Beret/"
23 -#define RESOURCE_PATH "Beret.app/Contents/Resources/"
24 -#else
25 +#define SUPPORT_PATH ".beret"
26 #define RESOURCE_PATH ""
27 -#endif
29 #define QUITMOD_WIN KMOD_ALT
30 #define QUITKEY_WIN SDLK_F4
31 @@ -812,7 +806,6 @@
33 int init() {
35 - #ifdef __APPLE__
36 char filestr[512];
37 // Get the home directory of the user.
38 struct passwd *pwd = getpwuid(getuid());
39 @@ -827,9 +820,6 @@
40 sprintf(filestr, "%s/saves", support_path);
41 mkdir(filestr, S_IRWXU);
43 - #else
44 - sprintf(support_path, "");
45 - #endif
47 if (SDL_Init(SDL_INIT_EVERYTHING) == -1) {
48 printf("Error: couldn't initialize SDL\n");