- Don't try to close joysticks that have never been opened (and do not
even exist, although reported as existing by SDL). From Antti Harri <iku@openbsd.fi>. - Don't pass -1 to a function expecting an unsigned int (ugly quick-fix by adding a cast; I'll suggest upstream to fix this in a better way). - Fix an sizeof (char *) error. The latter two fix the build on arm.
This commit is contained in:
parent
174ea062e2
commit
9efe957859
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2011/03/31 16:37:17 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2011/04/02 17:39:33 kili Exp $
|
||||
|
||||
COMMENT = 2D arcade game
|
||||
|
||||
DISTNAME = blobwars-1.18
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
CATEGORIES = games
|
||||
|
||||
|
17
games/blobwars/patches/patch-src_init_cpp
Normal file
17
games/blobwars/patches/patch-src_init_cpp
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-src_init_cpp,v 1.1 2011/04/02 17:39:33 kili Exp $
|
||||
--- src/init.cpp.orig Fri Apr 1 03:03:11 2011
|
||||
+++ src/init.cpp Fri Apr 1 03:29:23 2011
|
||||
@@ -461,9 +461,11 @@ void cleanup()
|
||||
if (SDL_NumJoysticks() > 0)
|
||||
{
|
||||
SDL_JoystickEventState(SDL_DISABLE);
|
||||
- for (int i = 0 ; i < SDL_NumJoysticks() ; i++)
|
||||
+ // Blobwars tries to open only the first joystick,
|
||||
+ // so test only the first here as well.
|
||||
+ if (SDL_JoystickOpened(0))
|
||||
{
|
||||
- debug(("Closing Joystick #%d - %s...\n", i, SDL_JoystickName(i)));
|
||||
+ debug(("Closing Joystick #%d - %s...\n", 0, SDL_JoystickName(0)));
|
||||
SDL_JoystickClose(config.sdlJoystick);
|
||||
}
|
||||
}
|
12
games/blobwars/patches/patch-src_map_cpp
Normal file
12
games/blobwars/patches/patch-src_map_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_map_cpp,v 1.1 2011/04/02 17:39:33 kili Exp $
|
||||
--- src/map.cpp.orig Sun Feb 13 18:22:21 2011
|
||||
+++ src/map.cpp Sat Apr 2 16:41:32 2011
|
||||
@@ -400,7 +400,7 @@ void showMap(int centerX, int centerY)
|
||||
engine.flushInput();
|
||||
engine.clearInput();
|
||||
|
||||
- doMusicInfo(-1);
|
||||
+ doMusicInfo((unsigned int) -1);
|
||||
|
||||
while (true)
|
||||
{
|
12
games/blobwars/patches/patch-src_player_cpp
Normal file
12
games/blobwars/patches/patch-src_player_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_player_cpp,v 1.1 2011/04/02 17:39:33 kili Exp $
|
||||
--- src/player.cpp.orig Sat Apr 2 17:12:34 2011
|
||||
+++ src/player.cpp Sat Apr 2 17:13:21 2011
|
||||
@@ -66,7 +66,7 @@ void presentPlayerMedal(const char *tname)
|
||||
// Copy the input, so that threading
|
||||
// doesn't trip us up!
|
||||
char *data = new char[128];
|
||||
- strlcpy(data, tname, sizeof data);
|
||||
+ strlcpy(data, tname, 128);
|
||||
|
||||
SDL_Thread *thread = SDL_CreateThread(medalWorker, (void*)data);
|
||||
|
Loading…
Reference in New Issue
Block a user