mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
Allegro: work around missing $TERM variable in Haiku
BeOS used toset $TERM to "dumb" when apps are run from Tracker, but Haiku leaves it unset. Make Allegro aware of the difference so it can detect when it's being started from Tracker.
This commit is contained in:
@@ -154,3 +154,27 @@ index 654c01c..2a9b171 100644
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 8a85c675661240b48a07625473da010646ea6e17 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 30 Nov 2013 11:36:07 +0100
|
||||
Subject: Avoid a crash when not started from terminal.
|
||||
|
||||
BeOS seems to set TERM environment variable to "dumb", but we don't.
|
||||
|
||||
diff --git a/src/beos/bsysapi.cpp b/src/beos/bsysapi.cpp
|
||||
index c6e4dad..a7c9d46 100644
|
||||
--- a/src/beos/bsysapi.cpp
|
||||
+++ b/src/beos/bsysapi.cpp
|
||||
@@ -128,7 +128,7 @@ static int32 system_thread(void *data)
|
||||
using_custom_allegro_app = false;
|
||||
|
||||
term = getenv("TERM");
|
||||
- if (!strcmp(term, "dumb")) {
|
||||
+ if (!term || !strcmp(term, "dumb")) {
|
||||
/* The TERM environmental variable is set to "dumb" if the app was
|
||||
* not started from a terminal.
|
||||
*/
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user