mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
adts: add LL_OPT_* defines that enable optimizations (some only make sense if there are tons of files, and need to be able to disable them for thesis). realized this would be perfect application of policy template classes, which will replace this.
fix crashdumps: was failing to write out to file (underlying cause: current directory no longer being set) app_hooks: add get_log_dir; used by debug and wdbg_sym minor improvements/documentation in archive+compression+file_cache+zip main: remove dead ScEd code This was SVN commit r3498.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "detect.h"
|
||||
#include "res/graphics/ogl_tex.h"
|
||||
#include "res/file/file.h"
|
||||
#include "res/file/vfs.h"
|
||||
|
||||
#include "app_hooks.h"
|
||||
|
||||
@@ -44,6 +45,21 @@ static void override_gl_upload_caps()
|
||||
}
|
||||
|
||||
|
||||
static const char* get_log_dir()
|
||||
{
|
||||
static char N_log_dir[PATH_MAX];
|
||||
ONCE(\
|
||||
char N_exe_name[PATH_MAX];\
|
||||
(void)sys_get_executable_name(N_exe_name, ARRAY_SIZE(N_exe_name));\
|
||||
/* strip app name (we only need path) */\
|
||||
char* slash = strrchr(N_exe_name, DIR_SEP);\
|
||||
if(slash) *slash = '\0';\
|
||||
(void)vfs_path_append(N_log_dir, N_exe_name, "../logs/");
|
||||
);
|
||||
return N_log_dir;
|
||||
}
|
||||
|
||||
|
||||
// convert contents of file <in_filename> from char to wchar_t and
|
||||
// append to <out> file.
|
||||
static void cat_atow(FILE* out, const char* in_filename)
|
||||
|
||||
Reference in New Issue
Block a user