mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-11 18:09:30 +08:00
consistent debug log location, for games that change cwd multiple times while running
This commit is contained in:
parent
0b49bd3338
commit
ca043837d9
@ -96,6 +96,10 @@ bool set_env_variable(std::string name, std::string value)
|
||||
|
||||
std::recursive_mutex global_mutex;
|
||||
|
||||
#ifndef EMU_RELEASE_BUILD
|
||||
const std::string dbg_log_file = get_full_program_path() + "STEAM_LOG.txt";
|
||||
#endif
|
||||
|
||||
SteamAPICall_t generate_steam_api_call_id() {
|
||||
static SteamAPICall_t a;
|
||||
randombytes((char *)&a, sizeof(a));
|
||||
|
@ -64,7 +64,9 @@
|
||||
#include <bcrypt.h>
|
||||
|
||||
#ifndef EMU_RELEASE_BUILD
|
||||
#define PRINT_DEBUG(a, ...) do {FILE *t = fopen("STEAM_LOG.txt", "a"); fprintf(t, "%u " a, GetCurrentThreadId(), __VA_ARGS__); fclose(t); WSASetLastError(0);} while (0)
|
||||
#include <string>
|
||||
extern const std::string dbg_log_file;
|
||||
#define PRINT_DEBUG(a, ...) do {FILE *t = fopen(dbg_log_file.c_str(), "a"); fprintf(t, "%u " a, GetCurrentThreadId(), __VA_ARGS__); fclose(t); WSASetLastError(0);} while (0)
|
||||
#endif
|
||||
|
||||
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
|
||||
@ -127,7 +129,9 @@ inline void reset_LastError()
|
||||
#define PATH_MAX_STRING_SIZE 512
|
||||
|
||||
#ifndef EMU_RELEASE_BUILD
|
||||
#define PRINT_DEBUG(...) {FILE *t = fopen("STEAM_LOG.txt", "a"); fprintf(t, __VA_ARGS__); fclose(t);}
|
||||
#include <string>
|
||||
extern const std::string dbg_log_file;
|
||||
#define PRINT_DEBUG(...) {FILE *t = fopen(dbg_log_file.c_str(), "a"); fprintf(t, __VA_ARGS__); fclose(t);}
|
||||
#endif
|
||||
#define PATH_SEPARATOR "/"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user