From ff3315d5d652a922a1d75d90223f85e7896d27c5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 13 Feb 2022 19:35:39 +0000 Subject: [PATCH] Haiku doc update, little code style fixes. --- CMakeLists.txt | 1 + doc/020_installation.md | 3 ++- src/client/menu/menu.c | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0075a9b3..d2037e22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,6 +162,7 @@ else() list(APPEND yquake2LinkerFlags "-rdynamic") else() list(APPEND yquake2LinkerFlags "-lnetwork") + set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") list(APPEND yquake2LinkerFlags "-lsocket -lnsl") diff --git a/doc/020_installation.md b/doc/020_installation.md index a219e8e7..5b6a6ab1 100644 --- a/doc/020_installation.md +++ b/doc/020_installation.md @@ -288,6 +288,7 @@ The build dependencies can be installed with: * On NetBSD: `pkgin install gmake SDL2 openal-soft curl` * On OpenBSD: `pkg_add gmake sdl2 openal curl` * On Solaris/Illumos: `pkg install sdl2 openal curl` +* On Haiku: `pkgman libsdl2_devel openal_devel curl_devel` * On MacOS the dependencies can be installed with Homebrew (from https://brew.sh): `brew install sdl2 openal-soft` @@ -299,7 +300,7 @@ Debian or FreeBSD packages. Download the latest release from https://www.yamagi.org/quake2 or clone the source from https://github.com/yquake2/yquake2.git, change into the -*yquake2/* source directory and type *make* (Linux, MacOS and Windows) +*yquake2/* source directory and type *make* (Linux, MacOS, Haiku and Windows) or *gmake* (FreeBSD, NetBSD, OpenBSD). Note on Solaris systems, *make* or *gmake* can be used, the latter provides in addition parallel build. After the build finished, copy everything from the *release/* directory diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c index b22e0c6d..e6efb1c7 100644 --- a/src/client/menu/menu.c +++ b/src/client/menu/menu.c @@ -624,8 +624,8 @@ M_Main_Draw(void) const char * M_Main_Key(int key) { - const char *sound = menu_move_sound; - int menu_key = Key_GetMenuKey(key); + const char *sound = menu_move_sound; + int menu_key = Key_GetMenuKey(key); switch (menu_key) { @@ -729,7 +729,7 @@ StartNetworkServerFunc(void *unused) static void Multiplayer_MenuInit(void) { - float scale = SCR_GetMenuScale(); + float scale = SCR_GetMenuScale(); s_multiplayer_menu.x = (int)(viddef.width * 0.50f) - 64 * scale; s_multiplayer_menu.nitems = 0; @@ -2898,7 +2898,7 @@ LoadGame_MenuKey(int key) { if (item->type == MTYPE_ACTION) { - DeleteSaveGameFunc( item ); + DeleteSaveGameFunc( item ); } } @@ -3070,7 +3070,7 @@ SaveGame_MenuKey(int key) { if (item->type == MTYPE_ACTION) { - DeleteSaveGameFunc( item ); + DeleteSaveGameFunc( item ); } }