Skip to content

Commit

Permalink
Remove: libtimidity support (NOT timidity support)
Browse files Browse the repository at this point in the history
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 5, 2019
1 parent f58db44 commit aa35052
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 199 deletions.
24 changes: 0 additions & 24 deletions config.lib
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -160,7 +159,6 @@ set_default() {
with_iconv
with_midi
with_midi_arg
with_libtimidity
with_fluidsynth
with_freetype
with_fontconfig
Expand Down Expand Up @@ -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";;
Expand Down Expand Up @@ -895,7 +889,6 @@ check_params() {
detect_fontconfig
detect_icu_layout
detect_icu_sort
detect_libtimidity
detect_fluidsynth

if [ "$with_direct_music" != "0" ]; then
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}
Expand Down Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
1 change: 0 additions & 1 deletion projects/generate
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions source.list
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
128 changes: 0 additions & 128 deletions src/music/libtimidity.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions src/music/libtimidity.h

This file was deleted.

3 comments on commit aa35052

@pelya
Copy link

@pelya pelya commented on aa35052 Sep 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented on aa35052 Sep 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

@pelya pelya commented on aa35052 Sep 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.