Skip to content
Permalink
Browse files

Remove: libtimidity support (NOT timidity support)

libtimidity was introduced with the support for PSP. PSP has been
dropped almost a year ago, but this music driver was not. This
corrects that oversight.

timidity (via extmidi) still works fine. This purely removes the
libtimidity support, which was only really available for PSP.
  • Loading branch information
TrueBrain committed Mar 4, 2019
1 parent f58db44 commit aa350528dfbfc8175f140202252cfdc6dbf46aa8
Showing with 0 additions and 199 deletions.
  1. +0 −24 config.lib
  2. +0 −1 configure
  3. +0 −1 projects/generate
  4. +0 −4 source.list
  5. +0 −128 src/music/libtimidity.cpp
  6. +0 −41 src/music/libtimidity.h
@@ -82,7 +82,6 @@ set_default() {
with_iconv="1"
with_midi=""
with_midi_arg=""
with_libtimidity="1"
with_fluidsynth="1"
with_freetype="1"
with_fontconfig="1"
@@ -160,7 +159,6 @@ set_default() {
with_iconv
with_midi
with_midi_arg
with_libtimidity
with_fluidsynth
with_freetype
with_fontconfig
@@ -370,10 +368,6 @@ detect_params() {
--without-libpng) with_png="0";;
--with-libpng=*) with_png="$optarg";;

--with-libtimidity) with_libtimidity="2";;
--without-libtimidity) with_libtimidity="0";;
--with-libtimidity=*) with_libtimidity="$optarg";;

--with-fluidsynth) with_fluidsynth="2";;
--without-fluidsynth) with_fluidsynth="0";;
--with-fluidsynth=*) with_fluidsynth="$optarg";;
@@ -895,7 +889,6 @@ check_params() {
detect_fontconfig
detect_icu_layout
detect_icu_sort
detect_libtimidity
detect_fluidsynth

if [ "$with_direct_music" != "0" ]; then
@@ -1812,17 +1805,6 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -DWITH_XAUDIO2"
fi

if [ -n "$libtimidity_config" ]; then
CFLAGS="$CFLAGS -DLIBTIMIDITY"
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"

if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
fi
fi

if [ -n "$fluidsynth" ]; then
LIBS="$LIBS -lfluidsynth"
CFLAGS="$CFLAGS -DFLUIDSYNTH"
@@ -2752,10 +2734,6 @@ detect_lzo2() {
detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h"
}

detect_libtimidity() {
detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
}

detect_fluidsynth() {
detect_library "$with_fluidsynth" "fluidsynth" "" "" "fluidsynth.h"
}
@@ -3544,8 +3522,6 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player"
echo " --with-libtimidity[=\"pkg-config libtimidity\"]"
echo " enables libtimidity support"
echo " --with-fluidsynth enables fluidsynth support"
echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support"
@@ -122,7 +122,6 @@ AWKCOMMAND='
"'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; }
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
if ($0 == "FLUIDSYNTH" && "'$fluidsynth'" == "" ) { next; }
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
if ($0 == "SSE" && "'$with_sse'" != "1") { next; }
@@ -138,7 +138,6 @@ load_main_data() {
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; }
if ($0 == "FLUIDSYNTH" && "'$enable_fluidsynth'" != "1") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
skip += 1;
@@ -403,7 +403,6 @@ zoom_type.h
music/bemidi.h
music/cocoa_m.h
music/extmidi.h
music/libtimidity.h
music/fluidsynth.h
music/os2_m.h
music/qtmidi.h
@@ -1120,9 +1119,6 @@ music/midifile.cpp
#if HAIKU
music/bemidi.cpp
#end
#if LIBTIMIDITY
music/libtimidity.cpp
#end
#if FLUIDSYNTH
music/fluidsynth.cpp
#end

This file was deleted.

This file was deleted.

3 comments on commit aa35052

@pelya

This comment has been minimized.

Copy link

pelya replied Sep 4, 2019

Objection! libtimidity is used in Android port.
Not a big deal actually, I'll maintain it as Android-specific patch.

@nielsmh

This comment has been minimized.

Copy link
Contributor

nielsmh replied Sep 4, 2019

Objection! libtimidity is used in Android port.
Not a big deal actually, I'll maintain it as Android-specific patch.

That's an argument for getting the Android port merged into mainline :)

@pelya

This comment has been minimized.

Copy link

pelya replied Sep 4, 2019

I am still recovering from mental damage when my Android patch was not merged 7 years ago: https://bugs.openttd.org/task/5330
And you will likely want to build it using official SDL2 library, not my unofficial SDL1.2 port with wacky features like cloud saves and moving mouse with gamepad.
Anyway, if you're interested, here's very minimal Android patch that mostly fixes compilation with NDK toolchain, and adds few necessary workarounds: pelya/OpenTTD-JGR-patchpack@e9d456f

Please sign in to comment.
You can’t perform that action at this time.