diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 0b62430ad3d7c369f4dcf485b6f4fbb65f8e1f67..3239be1e6fd0bd800cee48c3a34d2d362f708093 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
conbuf in '../shared/conbuf.pas',
geom in '../shared/geom.pas',
math,
-{$IFDEF USE_NANOGL}
- nanoGL in '../lib/nanogl/nanoGL.pas',
-{$ELSE}
- GL,
- GLExt,
-{$ENDIF}
+
+{$INCLUDE ../nogl/noGLuses.inc}
+
{$IFDEF USE_MINIUPNPC}
miniupnpc in '../lib/miniupnpc/miniupnpc.pas',
{$ENDIF}
g_triggers in 'g_triggers.pas',
g_weapons in 'g_weapons.pas',
g_window in 'g_window.pas',
- g_holmes in 'g_holmes.pas',
SysUtils,
{$IFDEF USE_FMOD}
fmod in '../lib/FMOD/fmod.pas',
g_panel in 'g_panel.pas',
g_language in 'g_language.pas',
+{$IFDEF ENABLE_HOLMES}
+ g_holmes in 'g_holmes.pas',
+
sdlcarcass in '../flexui/sdlcarcass.pas',
//sdlstandalone in '../flexui/sdlstandalone.pas',
fui_style in '../flexui/fui_style.pas',
fui_flexlay in '../flexui/fui_flexlay.pas',
fui_ctls in '../flexui/fui_ctls.pas',
+{$ENDIF}
ImagingTypes,
Imaging,
var
f: Integer;
noct: Boolean = false;
+{$IFDEF ANDROID}
+ storage: String;
+{$ENDIF}
//tfo: Text;
begin
SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]); //k8: fuck off, that's why
{$IFDEF ANDROID}
{$I-}
e_SetSafeSlowLog(true);
- Chdir(SDL_AndroidGetExternalStoragePath());
+ if SDL_AndroidGetExternalStorageState() <> 0 then
+ begin
+ storage := SDL_AndroidGetExternalStoragePath();
+ Chdir(storage);
+ e_WriteLog('Use external storage: ' + storage, TMsgType.Notify)
+ end
+ else
+ begin
+ storage := SDL_AndroidGetInternalStoragePath();
+ Chdir(storage);
+ e_WriteLog('Use internal storage: ' + storage, TMsgType.Notify)
+ end;
if IOresult <> 0 then
begin
- Chdir(SDL_AndroidGetInternalStoragePath());
- if IOresult <> 0 then
- begin
- e_WriteLog('Fuck! Cant chdir to any game directory :(', TMsgType.Fatal);
- result := 1;
- exit;
- end;
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, PChar('Invalid path'), PChar('Can''t chdir to ' + storage), nil);
+ result := 1;
+ exit
end;
+ SetEnvVar('TIMIDITY_CFG', 'timidity.cfg');
{$ENDIF ANDROID}
for f := 1 to ParamCount do