summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2011-09-11 23:07:23 +0000
committerSimon Howard2011-09-11 23:07:23 +0000
commit1bcdb39fd1b273941c493be9259b44c8560b5d16 (patch)
tree33e377560894b99dc2271b79e5607d59d78e6c33 /src
parentbab992ea55ea849d606e1733f10be42488441ab7 (diff)
parentdf292a6dce27e7b20faa0c829aa0c58a3693f979 (diff)
downloadchocolate-doom-1bcdb39fd1b273941c493be9259b44c8560b5d16.tar.gz
chocolate-doom-1bcdb39fd1b273941c493be9259b44c8560b5d16.tar.bz2
chocolate-doom-1bcdb39fd1b273941c493be9259b44c8560b5d16.zip
Merge from trunk.
Subversion-branch: /branches/raven-branch Subversion-revision: 2365
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am12
-rw-r--r--src/d_iwad.c18
-rw-r--r--src/doom-screensaver.desktop.in4
-rw-r--r--src/i_system.c1
4 files changed, 19 insertions, 16 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 746a015b..42e266cb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -195,26 +195,26 @@ appdir = $(prefix)/share/applications
app_DATA = @PROGRAM_PREFIX@doom.desktop
@PROGRAM_PREFIX@doom.desktop : doom.desktop
- cp $^ $@
+ cp $< $@
screensaverdir = $(prefix)/share/applications/screensavers
screensaver_DATA = @PROGRAM_PREFIX@doom-screensaver.desktop
@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop
- cp $^ $@
+ cp $< $@
.rc.o:
- $(WINDRES) $^ -o $@
+ $(WINDRES) $< -o $@
%.o : %.rc
- $(WINDRES) $^ -o $@
+ $(WINDRES) $< -o $@
if HAVE_PYTHON
icon.c : $(top_builddir)/data/doom8.ico
- $(top_builddir)/data/convert-icon $^ $@
+ $(top_builddir)/data/convert-icon $< $@
endif
midiread : midifile.c
- $(CC) -DTEST $(CFLAGS) @LDFLAGS@ $^ -o $@
+ $(CC) -DTEST $(CFLAGS) @LDFLAGS@ $< -o $@
diff --git a/src/d_iwad.c b/src/d_iwad.c
index 5cc31738..12a7ada2 100644
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -422,27 +422,29 @@ static GameMission_t IdentifyIWADByName(char *name, int mask)
{
size_t i;
GameMission_t mission;
+ char *p;
+
+ p = strrchr(name, DIR_SEPARATOR);
+
+ if (p != NULL)
+ {
+ name = p + 1;
+ }
mission = none;
for (i=0; i<arrlen(iwads); ++i)
{
- char *iwadname;
+ // Check if the filename is this IWAD name.
// Only use supported missions:
if (((1 << iwads[i].mission) & mask) == 0)
continue;
- iwadname = DEH_String(iwads[i].name);
-
- if (strlen(name) < strlen(iwadname))
- continue;
-
// Check if it ends in this IWAD name.
- if (!strcasecmp(name + strlen(name) - strlen(iwadname),
- iwadname))
+ if (!strcasecmp(name, iwadname))
{
mission = iwads[i].mission;
break;
diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in
index 178575a2..315f964c 100644
--- a/src/doom-screensaver.desktop.in
+++ b/src/doom-screensaver.desktop.in
@@ -1,6 +1,5 @@
[Desktop Entry]
-Encoding=UTF-8
Name=@PACKAGE_NAME@
Comment=@PACKAGE_SHORTDESC@
TryExec=@PROGRAM_PREFIX@doom
@@ -8,5 +7,6 @@ Exec=@PROGRAM_PREFIX@doom
StartupNotify=false
Terminal=false
Type=Application
-Categories=Screensaver
+OnlyShowIn=GNOME;
+Categories=Screensaver;
diff --git a/src/i_system.c b/src/i_system.c
index b3cd2769..38266c4f 100644
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -372,6 +372,7 @@ void I_Error (char *error, ...)
#endif
#ifdef __MACOSX__
+ if (!I_ConsoleStdout())
{
CFStringRef message;
char msgbuf[512];