Pushover added.
[aros:aros.git] / ports / game / pushover / pushover-0.0.5-aros.diff
1 diff -Naur pushover-0.0.5-orig/src/main.cpp pushover-0.0.5/src/main.cpp
2 --- pushover-0.0.5-orig/src/main.cpp    2013-10-20 15:34:02.820714057 +0200
3 +++ pushover-0.0.5/src/main.cpp 2013-05-19 17:51:54.000000000 +0200
4 @@ -146,31 +146,14 @@
5  
6  static std::string getDataDir(void)
7  {
8 -#if defined (__AROS__)
9 -  static char binaryPath[1024] = {0};
10 -  if (!*binaryPath)
11 -    NameFromLock(GetProgramDir(), binaryPath, sizeof(binaryPath));
12 -  return std::string(binaryPath);
13 -#else
14    struct stat st;
15    return std::string((stat(PKGDATADIR, &st) == 0) ? PKGDATADIR : ".");
16 -#endif
17  }
18  
19  static std::string getLocaleDir(void)
20  {
21 -#if defined (__AROS__)
22 -  static char localePath[1024] = {0};
23 -  if (!*localePath)
24 -  {
25 -    AddPart(localePath, getDataDir().c_str(), sizeof(localePath));
26 -    AddPart(localePath, "locale", sizeof(localePath));
27 -  }
28 -  return localePath;
29 -#else
30    struct stat st;
31    return std::string((stat(LOCALEDIR, &st) == 0) ? LOCALEDIR : "locale");
32 -#endif
33  }
34  
35  static unsigned int getKeyMask(void) {
36 @@ -294,7 +277,7 @@
37  
38    // setup internationalization
39  #if defined (__AROS__)
40 -  amigaLocale(LC_MESSAGES);
41 +  amigaLocale();
42  #endif
43    setlocale(LC_MESSAGES, "");
44    bindtextdomain("pushover", getLocaleDir().c_str());
45 diff -Naur pushover-0.0.5-orig/src/tools.cpp pushover-0.0.5/src/tools.cpp
46 --- pushover-0.0.5-orig/src/tools.cpp   2013-10-20 15:34:02.820714057 +0200
47 +++ pushover-0.0.5/src/tools.cpp        2013-05-19 17:51:54.000000000 +0200
48 @@ -42,6 +42,7 @@
49  #if defined(__AROS__)
50  #include <proto/locale.h>
51  #include <proto/dos.h>
52 +#include <string.h>
53  #endif
54  
55  uint64_t getTime(void)
56 @@ -88,10 +89,7 @@
57  
58  #elif defined (__AROS__)
59  
60 -  static char binaryPath[1024] = {0};
61 -  if (!*binaryPath)
62 -    NameFromLock(GetProgramDir(), binaryPath, sizeof(binaryPath));
63 -  std::string home = std::string(binaryPath);
64 +  std::string home = std::string("PROGDIR:.pushover/");
65  
66  #else
67  
68 @@ -116,10 +114,6 @@
69        throw std::runtime_error("Can't create home directory: " + home);
70    }
71  
72 -#if defined (__AROS__)
73 -  home += '/';
74 -#endif
75 -
76    return home;
77  }
78  
79 diff -Naur pushover-0.0.5-orig/src/window.cpp pushover-0.0.5/src/window.cpp
80 --- pushover-0.0.5-orig/src/window.cpp  2013-10-20 15:34:02.820714057 +0200
81 +++ pushover-0.0.5/src/window.cpp       2013-05-19 17:51:54.000000000 +0200
82 @@ -28,7 +28,7 @@
83  #include "solvedmap.h"
84  #include "leveldata.h"
85  #if defined(__AROS__)
86 -
87 +#define PACKAGE_VERSION "0.0.5"
88  #else
89  #include "config.h"
90  #endif