diff options
author | sfan5 <sfan5@live.de> | 2023-01-23 00:19:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 00:19:30 +0100 |
commit | 87d509e4625df2d76a80f14cab3d420bd58ba20a (patch) | |
tree | 8a17b87abf96312a79f49c05c7c4824766bcb39f /src/porting.h | |
parent | 6f5703baf1737ca1d7dd70982e878fd83d288cdd (diff) | |
download | minetest-87d509e4625df2d76a80f14cab3d420bd58ba20a.tar.xz |
Implement --debugger option to improve UX when debugging crashes (#13157)
Diffstat (limited to 'src/porting.h')
-rw-r--r-- | src/porting.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/porting.h b/src/porting.h index 93932e1d9..cc23e3c62 100644 --- a/src/porting.h +++ b/src/porting.h @@ -156,6 +156,11 @@ extern std::string path_locale; extern std::string path_cache; /* + Gets the path of our executable. +*/ +bool getCurrentExecPath(char *buf, size_t len); + +/* Get full path of stuff in data directory. Example: "stone.png" -> "../data/stone.png" */ @@ -330,6 +335,11 @@ bool secure_rand_fill_buf(void *buf, size_t len); // This attaches to the parents process console, or creates a new one if it doesnt exist. void attachOrCreateConsole(); +#ifdef _WIN32 +// Quotes an argument for use in a CreateProcess() commandline (not cmd.exe!!) +std::string QuoteArgv(const std::string &arg); +#endif + int mt_snprintf(char *buf, const size_t buf_size, const char *fmt, ...); /** |