summaryrefslogtreecommitdiff
path: root/textscreen
diff options
context:
space:
mode:
authorSimon Howard2006-10-24 19:23:16 +0000
committerSimon Howard2006-10-24 19:23:16 +0000
commit939bb4cf3e586643919d606620bf298f2351d735 (patch)
tree2dae86b4143f735e57e1073b901ce9ad5b51036b /textscreen
parent79ce35e89a61ad093d1f352a01c11c3307a8a1b1 (diff)
downloadchocolate-doom-939bb4cf3e586643919d606620bf298f2351d735.tar.gz
chocolate-doom-939bb4cf3e586643919d606620bf298f2351d735.tar.bz2
chocolate-doom-939bb4cf3e586643919d606620bf298f2351d735.zip
Detect failures to initialise textscreen library and bomb out with an
error mess age. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 727
Diffstat (limited to 'textscreen')
-rw-r--r--textscreen/examples/calculator.c7
-rw-r--r--textscreen/examples/guitest.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/textscreen/examples/calculator.c b/textscreen/examples/calculator.c
index 968d3ef4..b8fefaa3 100644
--- a/textscreen/examples/calculator.c
+++ b/textscreen/examples/calculator.c
@@ -144,7 +144,12 @@ void BuildGUI()
int main(int argc, char *argv[])
{
- TXT_Init();
+ if (!TXT_Init())
+ {
+ fprintf(stderr, "Failed to initialise GUI\n");
+ exit(-1);
+ }
+
TXT_SetDesktopTitle("Calculator demo");
BuildGUI();
diff --git a/textscreen/examples/guitest.c b/textscreen/examples/guitest.c
index e385ca84..94483236 100644
--- a/textscreen/examples/guitest.c
+++ b/textscreen/examples/guitest.c
@@ -159,7 +159,11 @@ void Window2(void)
int main(int argc, char *argv[])
{
- TXT_Init();
+ if (!TXT_Init())
+ {
+ fprintf(stderr, "Failed to initialise GUI\n");
+ exit(-1);
+ }
TXT_SetDesktopTitle("Not Chocolate Doom Setup");