mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
3fc23f2b2c
This adds the `-console` command-line option (for Win32 only) so the game can spawn an attached console window which will contain all console output. This is to make it easier for people to debug on Windows systems. Otherwise, the only way to get console output would be to either compile the application as a console app (i.e. switch the subsystem to console) - which is undesirable for regular users as this makes it so a console is always spawned even when unwanted - or launch the game with shell arguments that make it so output is redirected to a file. As a result, color checking support is factored out of vlog_init() into its own function, even though we don't support colors on Windows.
41 lines
771 B
C
41 lines
771 B
C
#ifndef VLOGGING_H
|
|
#define VLOGGING_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include <SDL_stdinc.h>
|
|
|
|
void vlog_init(void);
|
|
|
|
#ifdef _WIN32
|
|
void vlog_open_console(void);
|
|
#endif
|
|
|
|
void vlog_toggle_output(int enable_output);
|
|
|
|
void vlog_toggle_color(int enable_color);
|
|
|
|
void vlog_toggle_debug(int enable_debug);
|
|
|
|
void vlog_toggle_info(int enable_info);
|
|
|
|
void vlog_toggle_warn(int enable_warn);
|
|
|
|
void vlog_toggle_error(int enable_error);
|
|
|
|
SDL_PRINTF_VARARG_FUNC(1) void vlog_debug(const char* text, ...);
|
|
|
|
SDL_PRINTF_VARARG_FUNC(1) void vlog_info(const char* text, ...);
|
|
|
|
SDL_PRINTF_VARARG_FUNC(1) void vlog_warn(const char* text, ...);
|
|
|
|
SDL_PRINTF_VARARG_FUNC(1) void vlog_error(const char* text, ...);
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* VLOGGING_H */
|