Further fixes for Haiku

- Haiku is Unix-like, but it still doesn't use libnotify.
- Haiku comes with its own sets of definitions for certain long variables.
  There's still a problem revolving around the variables, but I removed a
  duplicate, conflicting definition on the Haiku platform.
- Changed some definition-related logic in detect.h, because the gcc compiler
  in Haiku (version 8.3.0) complained about duplicate definitions. I chose to
  use 'unknown' rather than an empty string on one occasion.
- Changed size of m_aLastSoundPlayed[CHAT_NUM] in
  `src/game/client/components/chat.cpp` due to an undocumented/undiscovered bug
  in Haiku.
This commit is contained in:
Panagiotis Vasilopoulos 2021-04-18 15:16:05 +03:00
parent 2916f1b7d4
commit 3b1c074842
No known key found for this signature in database
GPG key ID: FD806FDB3B2C5270
3 changed files with 10 additions and 3 deletions

View file

@ -179,7 +179,13 @@
#define PLATFORM_SUFFIX ""
#endif
#define CONF_PLATFORM_STRING PLATFORM_STRING PLATFORM_SUFFIX
#ifndef CONF_PLATFORM_STRING
#define CONF_PLATFORM_STRING "unknown"
#endif
#ifndef PLATFORM_STRING
#define PLATFORM_STRING "unknown"
#endif
#ifndef CONF_ARCH_STRING
#define CONF_ARCH_STRING "unknown"

View file

@ -1115,7 +1115,8 @@ void CGraphicsBackend_SDL_OpenGL::SetWindowParams(int FullscreenMode, bool IsBor
{
if(FullscreenMode == 1)
{
#if defined(CONF_PLATFORM_MACOS) || defined(CONF_PLATFORM_HAIKU) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen)
#if defined(CONF_PLATFORM_MACOS) || defined(CONF_PLATFORM_HAIKU)
// Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen)
SDL_SetWindowFullscreen(m_pWindow, SDL_WINDOW_FULLSCREEN_DESKTOP);
#else
SDL_SetWindowFullscreen(m_pWindow, SDL_WINDOW_FULLSCREEN);

View file

@ -4,7 +4,7 @@
#if defined(CONF_PLATFORM_MACOS)
// Code is in src/macos/notification.mm.
#elif defined(CONF_FAMILY_UNIX) && !defined(CONF_PLATFORM_ANDROID)
#elif defined(CONF_FAMILY_UNIX) && !defined(CONF_PLATFORM_ANDROID) && !defined(CONF_PLATFORM_HAIKU)
#include <libnotify/notify.h>
void NotificationsInit()
{