mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
72 lines
2.1 KiB
Plaintext
72 lines
2.1 KiB
Plaintext
From a5bb4f4ace0edeafe26cf92b3f24e07a1ac75d7f Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@gmail.com>
|
|
Date: Fri, 20 Feb 2015 08:59:44 +0100
|
|
Subject: Make gcc2 happy.
|
|
|
|
|
|
diff --git a/PuyoStarter.cpp b/PuyoStarter.cpp
|
|
index d51eb61..4d3553f 100644
|
|
--- a/PuyoStarter.cpp
|
|
+++ b/PuyoStarter.cpp
|
|
@@ -604,6 +604,7 @@ void PuyoStarter::run(int _score1, int _score2, int lives, int point1, int point
|
|
}
|
|
break;
|
|
case SDL_KEYDOWN:
|
|
+ {
|
|
/* check for cheat-codes */
|
|
static int cheatcode = 0;
|
|
if (event.key.keysym.sym == SDLK_k) cheatcode = 0;
|
|
@@ -617,6 +618,7 @@ void PuyoStarter::run(int _score1, int _score2, int lives, int point1, int point
|
|
attachedGameA->dropNeutrals();
|
|
attachedGameA->increaseNeutralPuyos(PUYODIMX * 12);
|
|
}
|
|
+ }
|
|
default:
|
|
break;
|
|
}
|
|
--
|
|
2.2.2
|
|
|
|
|
|
From 1b0eccc61ce85dddd693a763f560756fb100f89d Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@gmail.com>
|
|
Date: Fri, 20 Feb 2015 09:41:48 +0100
|
|
Subject: Move settings to the right place.
|
|
|
|
|
|
diff --git a/preferences.c b/preferences.c
|
|
index 7f2cbdd..1b7d957 100644
|
|
--- a/preferences.c
|
|
+++ b/preferences.c
|
|
@@ -145,6 +145,10 @@ void GetStrPreference (const char *name, char *out, const char *defaut, const in
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#endif
|
|
+
|
|
static const char * prefsfile = ".flobopuyorc";
|
|
static const char * sep = "\n\r";
|
|
|
|
@@ -158,10 +162,13 @@ static void fetchFile(void)
|
|
|
|
if (home == NULL)
|
|
{
|
|
-#ifndef _WIN32
|
|
- char * h = getenv("HOME");
|
|
-#else
|
|
+#ifdef __HAIKU__
|
|
+ char h[256];
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, h, 256);
|
|
+#elif defined _WIN32
|
|
char * h = ".";
|
|
+#else
|
|
+ char * h = getenv("HOME");
|
|
#endif
|
|
if (h==NULL) return;
|
|
home = (char *)malloc(strlen(h)+strlen(prefsfile)+2);
|
|
--
|
|
2.2.2
|
|
|