diff options
author | truelight <truelight@openttd.org> | 2007-02-16 09:39:32 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-02-16 09:39:32 +0000 |
commit | b18c5a19db6ff71c93fc8045b83ec7d6af9efcd5 (patch) | |
tree | 6a70178e170b8c5d506eb1c1a2f545aa99b37c0f | |
parent | 128caa5050f8c2a0ee17e7dc48ef4dc06bb52751 (diff) | |
download | openttd-b18c5a19db6ff71c93fc8045b83ec7d6af9efcd5.tar.xz |
(svn r8756) [PSP] -Fix: made the dedicated code compile with PSP. It is almost UNIX, just it needs more includes ;)
(or more, it compiles, if it works is a whole other story ;))
-rw-r--r-- | src/video/dedicated_v.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index 043414945..d794ae26b 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -45,12 +45,16 @@ static void OS2_SwitchToConsoleMode(void) } #endif -#ifdef UNIX +#if defined(UNIX) || defined(PSP) # include <sys/time.h> /* gettimeofday */ # include <sys/types.h> # include <unistd.h> # include <signal.h> # define STDIN 0 /* file descriptor for standard input */ +# if defined(PSP) +# include <sys/fd_set.h> +# include <sys/select.h> +# endif /* PSP */ /* Signal handlers */ static void DedicatedSignalHandler(int sig) @@ -148,7 +152,7 @@ static void DedicatedVideoMakeDirty(int left, int top, int width, int height) {} static bool DedicatedVideoChangeRes(int w, int h) { return false; } static void DedicatedVideoFullScreen(bool fs) {} -#if defined(UNIX) || defined(__OS2__) +#if defined(UNIX) || defined(__OS2__) || defined(PSP) static bool InputWaiting(void) { struct timeval tv; @@ -194,7 +198,7 @@ static void DedicatedHandleKeyInput(void) if (_exit_game) return; -#if defined(UNIX) || defined(__OS2__) +#if defined(UNIX) || defined(__OS2__) || defined(PSP) if (fgets(input_line, lengthof(input_line), stdin) == NULL) return; #else /* Handle console input, and singal console thread, it can accept input again */ @@ -227,7 +231,7 @@ static void DedicatedVideoMainLoop(void) uint32 next_tick = cur_ticks + 30; /* Signal handlers */ -#ifdef UNIX +#if defined(UNIX) || defined(PSP) signal(SIGTERM, DedicatedSignalHandler); signal(SIGINT, DedicatedSignalHandler); signal(SIGQUIT, DedicatedSignalHandler); |