- Added Linux support for the CMakeLists. This meant downgrading them for
CMake 2.4, since the distros don't seem to consider 2.6 stable yet. As a bonus, GTK+ is no longer a required dependency; now it's optional. - Made dehsupp ignore CR characters, so it doesn't spew warnings on Linux. SVN r1092 (trunk)
This commit is contained in:
parent
0e9c1d0c2a
commit
de5d4715c2
24 changed files with 106 additions and 248 deletions
|
|
@ -29,9 +29,11 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/time.h>
|
||||
#ifndef NO_GTK
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#endif
|
||||
|
||||
#include "doomerrors.h"
|
||||
#include <math.h>
|
||||
|
|
@ -71,8 +73,10 @@ extern "C"
|
|||
double CyclesPerSecond = 1e8;
|
||||
CPUInfo CPU;
|
||||
}
|
||||
|
||||
extern bool GtkAvailable;
|
||||
|
||||
#ifndef NO_GTK
|
||||
extern bool GtkAvailable;
|
||||
#endif
|
||||
|
||||
void CalculateCPUSpeed ();
|
||||
|
||||
|
|
@ -342,6 +346,7 @@ void I_PrintStr (const char *cp)
|
|||
fflush (stdout);
|
||||
}
|
||||
|
||||
#ifndef NO_GTK
|
||||
// GtkTreeViews eats return keys. I want this to be like a Windows listbox
|
||||
// where pressing Return can still activate the default button.
|
||||
gint AllowDefault(GtkWidget *widget, GdkEventKey *event, gpointer func_data)
|
||||
|
|
@ -381,7 +386,7 @@ void ClickedOK(GtkButton *button, gpointer func_data)
|
|||
}
|
||||
|
||||
EXTERN_CVAR (Bool, queryiwad);
|
||||
|
||||
|
||||
int I_PickIWad_Gtk (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
|
@ -513,7 +518,8 @@ int I_PickIWad_Gtk (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
|||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||
{
|
||||
|
|
@ -523,11 +529,13 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
|||
{
|
||||
return defaultiwad;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_GTK
|
||||
if (GtkAvailable)
|
||||
{
|
||||
return I_PickIWad_Gtk (wads, numwads, showwin, defaultiwad);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
printf ("Please select a game wad (or 0 to exit):\n");
|
||||
for (i = 0; i < numwads; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue