diff options
author | Patric Stout <truebrain@openttd.org> | 2018-04-29 14:12:23 +0200 |
---|---|---|
committer | Patric Stout <truebrain@openttd.org> | 2018-04-29 15:32:16 +0200 |
commit | 85adde74858161240860ed9e4bf67f9be838de45 (patch) | |
tree | c49c092551d1b9070afe61447c412b9f0f107a11 /src | |
parent | 8d8b9a026a5915c2bf4591b74d79dfa1dcf791d8 (diff) | |
download | openttd-85adde74858161240860ed9e4bf67f9be838de45.tar.xz |
Remove: PSP support
Diffstat (limited to 'src')
-rw-r--r-- | src/music/libtimidity.cpp | 23 | ||||
-rw-r--r-- | src/network/core/host.cpp | 7 | ||||
-rw-r--r-- | src/network/core/os_abstraction.h | 25 | ||||
-rw-r--r-- | src/openttd.cpp | 5 | ||||
-rw-r--r-- | src/os/unix/unix.cpp | 4 | ||||
-rw-r--r-- | src/stdafx.h | 14 | ||||
-rw-r--r-- | src/video/allegro_v.cpp | 2 | ||||
-rw-r--r-- | src/video/dedicated_v.cpp | 12 |
8 files changed, 8 insertions, 84 deletions
diff --git a/src/music/libtimidity.cpp b/src/music/libtimidity.cpp index 1cb2adc0f..93284bd83 100644 --- a/src/music/libtimidity.cpp +++ b/src/music/libtimidity.cpp @@ -22,9 +22,6 @@ #include <sys/stat.h> #include <errno.h> #include <timidity.h> -#if defined(PSP) -#include <pspaudiolib.h> -#endif /* PSP */ #include "../safeguards.h" @@ -44,16 +41,6 @@ static struct { uint32 song_position; } _midi; ///< Metadata about the midi we're playing. -#if defined(PSP) -static void AudioOutCallback(void *buf, unsigned int _reqn, void *userdata) -{ - memset(buf, 0, _reqn * PSP_NUM_AUDIO_CHANNELS); - if (_midi.status == MIDI_PLAYING) { - mid_song_read_wave(_midi.song, buf, _reqn * PSP_NUM_AUDIO_CHANNELS); - } -} -#endif /* PSP */ - /** Factory for the libtimidity driver. */ static FMusicDriver_LibTimidity iFMusicDriver_LibTimidity; @@ -75,17 +62,7 @@ const char *MusicDriver_LibTimidity::Start(const char * const *param) _midi.options.rate = 44100; _midi.options.format = MID_AUDIO_S16LSB; _midi.options.channels = 2; -#if defined(PSP) - _midi.options.buffer_size = PSP_NUM_AUDIO_SAMPLES; -#else _midi.options.buffer_size = _midi.options.rate; -#endif - -#if defined(PSP) - pspAudioInit(); - pspAudioSetChannelCallback(_midi.options.channels, &AudioOutCallback, NULL); - pspAudioSetVolume(_midi.options.channels, PSP_VOLUME_MAX, PSP_VOLUME_MAX); -#endif /* PSP */ return NULL; } diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp index cf98239f8..e431dde9f 100644 --- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -24,12 +24,7 @@ */ static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast); -#if defined(PSP) -static void NetworkFindBroadcastIPsInternal(NetworkAddressList *broadcast) // PSP implementation -{ -} - -#elif defined(BEOS_NET_SERVER) || defined(__HAIKU__) /* doesn't have neither getifaddrs or net/if.h */ +#if defined(BEOS_NET_SERVER) || defined(__HAIKU__) /* doesn't have neither getifaddrs or net/if.h */ /* Based on Andrew Bachmann's netstat+.c. Big thanks to him! */ extern "C" int _netstat(int fd, char **output, int verbose); diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h index 9608f08fa..c24cc9f8f 100644 --- a/src/network/core/os_abstraction.h +++ b/src/network/core/os_abstraction.h @@ -194,29 +194,6 @@ static inline void OTTDfreeaddrinfo(struct addrinfo *ai) #define IPV6_V6ONLY 27 #endif -#if defined(PSP) -# include <sys/socket.h> -# include <netinet/in.h> -# include <arpa/inet.h> -# include <pspnet.h> -# include <pspnet_inet.h> -# include <pspnet_apctl.h> -# include <pspnet_resolver.h> -# include <errno.h> -# include <unistd.h> -# include <sys/select.h> -# include <sys/time.h> -# include <sys/fd_set.h> - -# define TCP_NODELAY 1 -# define SO_NONBLOCK 0x1009 -# define SOCKET int -# define INVALID_SOCKET -1 -# define INADDR_NONE 0xffffffff -# define closesocket close -# define GET_LAST_ERROR() sceNetInetGetErrno() -#endif /* PSP */ - /* OS/2 stuff */ #if defined(__OS2__) # define SOCKET int @@ -318,7 +295,7 @@ static inline bool SetNonBlocking(SOCKET d) #else int nonblocking = 1; #endif -#if (defined(__BEOS__) && defined(BEOS_NET_SERVER)) || defined(PSP) +#if (defined(__BEOS__) && defined(BEOS_NET_SERVER)) return setsockopt(d, SOL_SOCKET, SO_NONBLOCK, &nonblocking, sizeof(nonblocking)) == 0; #else return ioctlsocket(d, FIONBIO, &nonblocking) == 0; diff --git a/src/openttd.cpp b/src/openttd.cpp index dd48fb986..24e3e97ff 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1407,11 +1407,6 @@ static void DoAutosave() { char buf[MAX_PATH]; -#if defined(PSP) - /* Autosaving in networking is too time expensive for the PSP */ - if (_networking) return; -#endif /* PSP */ - if (_settings_client.gui.keep_all_autosave) { GenerateDefaultSaveName(buf, lastof(buf)); strecat(buf, ".sav", lastof(buf)); diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index d7c2304ce..bea69ec93 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -308,9 +308,7 @@ bool GetClipboardContents(char *buffer, const char *last) void CSleep(int milliseconds) { - #if defined(PSP) - sceKernelDelayThread(milliseconds * 1000); - #elif defined(__BEOS__) + #if defined(__BEOS__) snooze(milliseconds * 1000); #elif defined(__AMIGA__) { diff --git a/src/stdafx.h b/src/stdafx.h index 6c59d7f20..8c0f30252 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -100,12 +100,6 @@ #define strcasecmp stricmp #endif -#if defined(PSP) - #include <psptypes.h> - #include <pspdebug.h> - #include <pspthreadman.h> -#endif - #if defined(SUNOS) || defined(HPUX) #include <alloca.h> #endif @@ -134,14 +128,6 @@ #define CLIB_USERGROUP_PROTOS_H #endif /* __MORPHOS__ */ -#if defined(PSP) - /* PSP can only have 10 file-descriptors open at any given time, but this - * switch only limits reads via the Fio system. So keep 2 fds free for things - * like saving a game. */ - #define LIMITED_FDS 8 - #define printf pspDebugScreenPrintf -#endif /* PSP */ - /* Stuff for GCC */ #if defined(__GNUC__) #define NORETURN __attribute__ ((noreturn)) diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index 01628f99c..50fe0c499 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -458,7 +458,7 @@ void VideoDriver_Allegro::Stop() if (--_allegro_instance_count == 0) allegro_exit(); } -#if defined(UNIX) || defined(__OS2__) || defined(PSP) || defined(DOS) +#if defined(UNIX) || defined(__OS2__) || defined(DOS) # include <sys/time.h> /* gettimeofday */ static uint32 GetTime() diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index 5e2be481c..52e0b6faa 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -57,16 +57,12 @@ static void OS2_SwitchToConsoleMode() } #endif -#if defined(UNIX) || defined(PSP) +#if defined(UNIX) # 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) @@ -196,7 +192,7 @@ void VideoDriver_Dedicated::MakeDirty(int left, int top, int width, int height) bool VideoDriver_Dedicated::ChangeResolution(int w, int h) { return false; } bool VideoDriver_Dedicated::ToggleFullscreen(bool fs) { return false; } -#if defined(UNIX) || defined(__OS2__) || defined(PSP) +#if defined(UNIX) || defined(__OS2__) static bool InputWaiting() { struct timeval tv; @@ -242,7 +238,7 @@ static void DedicatedHandleKeyInput() if (_exit_game) return; -#if defined(UNIX) || defined(__OS2__) || defined(PSP) +#if defined(UNIX) || defined(__OS2__) if (fgets(input_line, lengthof(input_line), stdin) == NULL) return; #else /* Handle console input, and signal console thread, it can accept input again */ @@ -269,7 +265,7 @@ void VideoDriver_Dedicated::MainLoop() uint32 next_tick = cur_ticks + MILLISECONDS_PER_TICK; /* Signal handlers */ -#if defined(UNIX) || defined(PSP) +#if defined(UNIX) signal(SIGTERM, DedicatedSignalHandler); signal(SIGINT, DedicatedSignalHandler); signal(SIGQUIT, DedicatedSignalHandler); |