summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73eaa32)
raw | patch | inline | side by side (parent: 73eaa32)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 2 Jan 2018 23:52:02 +0000 (23:52 +0000) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 3 Jan 2018 00:03:38 +0000 (02:03 +0200) |
index a9e254bd725365b52b5444a1370d62bd14ee14fb..59e43fd31112ef0020da1cff36c23a3976465c63 100644 (file)
unixtype, linux
{$ELSEIF DEFINED(WINDOWS)}
Windows
+ {$ELSEIF DEFINED(HAIKU)}
+ unixtype
{$ELSE}
{$WARNING You suck!}
{$ENDIF}
if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available');
mFrequency := 1; // just a flag
if (r.tv_nsec <> 0) then mFrequency := 1000000000000000000 div r.tv_nsec;
-{$ELSE}
+{$ELSEIF DEFINED(WINDOWS)}
mHasHPTimer := QueryPerformanceFrequency(r);
if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available');
mFrequency := r;
{$IF DEFINED(LINUX)}
clock_gettime(CLOCK_MONOTONIC, @r);
result := UInt64(r.tv_sec)*1000000+UInt64(r.tv_nsec) div 1000; // microseconds
- {$ELSE}
+ {$ELSEIF DEFINED(WINDOWS)}
QueryPerformanceCounter(r);
result := UInt64(r)*1000000 div mFrequency;
{$ENDIF}
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 9553cbecfc2a5f058315912aea9392e824367614..8444232487b70404ff6b6575e96c4778e65fa51e 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
e_input, e_log, g_console, g_items, g_map, g_panel,
g_playermodel, g_gfx, g_options, g_weapons, Math,
g_triggers, g_monsters, e_sound, CONFIG,
- g_language, g_net, SDL,
+ g_language, g_net,
ENet, e_msg, g_netmsg, g_netmaster, GL, GLExt,
sfs, wadreader, g_holmes;
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 12f33c6940fd05a7bff33ced7fb4bc58aff1d8d7..ac2495448ed9caf0cefec0dd91ceb0c7b010ea63 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
{$ENDIF}
{$ELSE}
{$IFDEF USE_SDLMIXER}
- sdlflags := SDL_INIT_EVERYTHING;
+ {*sdlflags := SDL_INIT_EVERYTHING;*}
+ sdlflags := SDL_INIT_JOYSTICK or SDL_INIT_TIMER or SDL_INIT_VIDEO;
{$ELSE}
sdlflags := SDL_INIT_JOYSTICK or SDL_INIT_TIMER or SDL_INIT_VIDEO;
{$ENDIF}
diff --git a/src/lib/sdl2/sdl2.pas b/src/lib/sdl2/sdl2.pas
index 168742e872eb3b411f2d7060755c914e5aa15251..745985ac56252b5a1a78eb306a81ceb9f8c7d388 100644 (file)
--- a/src/lib/sdl2/sdl2.pas
+++ b/src/lib/sdl2/sdl2.pas
Windows;
{$ENDIF}
- {$IFDEF UNIX}
- uses
- X,
- XLib;
+ {$IF DEFINED(UNIX)}
+ {$IF NOT DEFINED(HAIKU)}
+ uses
+ X,
+ XLib;
+ {$ENDIF}
{$ENDIF}
{$IFDEF DARWIN}
SDL_LibName = 'SDL2.dll';
{$ENDIF}
- {$IFDEF UNIX}
+ {$IF DEFINED(HAIKU)}
+ SDL_LibName = 'libSDL2.so.0';
+ {$ELSEIF DEFINED(UNIX)}
{$IFDEF DARWIN}
SDL_LibName = 'libSDL2.dylib';
{$ELSE}
index 0b2b7c68c2a4e8db884282c7f04a5fe578b857b0..f89df21f731248abb1caf4bde8d69b31d33d6cf0 100644 (file)
{$ENDIF}
{$IF DEFINED (LINUX) OR DEFINED(UNIX)}
- {$DEFINE SDL_VIDEO_DRIVER_X11}
+ {$IF NOT DEFINED(HAIKU)}
+ {$DEFINE SDL_VIDEO_DRIVER_X11}
+ {$ENDIF}
{$IFEND}
{$IFDEF DARWIN}
index b4e2fc4d2e8332b5fa96ba18b274e48cd47e3dac..9584fe63aac03b7473ec5983cc380dc4c376d325 100644 (file)
--- a/src/shared/xprofiler.pas
+++ b/src/shared/xprofiler.pas
{$ELSEIF DEFINED(WINDOWS)}
{$DEFINE STOPWATCH_IS_HERE}
Windows
+ {$ELSEIF DEFINED(HAIKU)}
+ {$DEFINE STOPWATCH_IS_HERE}
+ unixtype
{$ELSE}
{$IFDEF STOPWATCH_IS_HERE}
{$UNDEF STOPWATCH_IS_HERE}
if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available');
mFrequency := 1; // just a flag
if (r.tv_nsec <> 0) then mFrequency := 1000000000000000000 div r.tv_nsec;
-{$ELSE}
+{$ELSEIF DEFINED(WINDOWS)}
mHasHPTimer := QueryPerformanceFrequency(r);
if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available');
mFrequency := r;
{$IF DEFINED(LINUX)}
clock_gettime(CLOCK_MONOTONIC, @r);
result := UInt64(r.tv_sec)*1000000+UInt64(r.tv_nsec) div 1000; // microseconds
- {$ELSE}
+ {$ELSEIF DEFINED(WINDOWS)}
QueryPerformanceCounter(r);
result := UInt64(r)*1000000 div mFrequency;
{$ENDIF}