Skip to content

Commit

Permalink
Move DebugModeEnabled to error module for centralized debug control
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokaro committed Feb 28, 2024
1 parent 4701e89 commit 5cdddfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <stdio.h>
#include "error.h"

BOOL DebugModeEnabled = FALSE;

DWORD PrintFatalMessage(char *format, ...)
{
fprintf_s(stderr, "FATAL: ");
Expand Down
2 changes: 2 additions & 0 deletions src/error.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#define EXIT_CODE_FAILURE ((DWORD)-1)

extern BOOL DebugModeEnabled;

void PrintDebugMessage(char *format, ...);

#if _CONSOLE
Expand Down
2 changes: 0 additions & 2 deletions src/stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ BOOL DecompressLzma(void *unpack_data, size_t unpack_size, void *src, size_t src
char *Script_ApplicationName = NULL;
char *Script_CommandLine = NULL;

BOOL DebugModeEnabled = FALSE;

char InstDir[MAX_PATH];

char* ConcatStr(const char *first, ...) {
Expand Down

0 comments on commit 5cdddfa

Please sign in to comment.