SDL_assertion messages use "\n" instead of "\r\n" on non-Windows platforms.
This commit is contained in:
parent
c2ec53f4fa
commit
ec4cfa8c73
1 changed files with 8 additions and 1 deletions
|
@ -126,6 +126,12 @@ static void SDL_AbortAssertion(void)
|
||||||
static SDL_assert_state
|
static SDL_assert_state
|
||||||
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
|
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
|
||||||
{
|
{
|
||||||
|
#ifdef __WIN32__
|
||||||
|
#define ENDLINE "\r\n"
|
||||||
|
#else
|
||||||
|
#define ENDLINE "\n"
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *envr;
|
const char *envr;
|
||||||
SDL_assert_state state = SDL_ASSERTION_ABORT;
|
SDL_assert_state state = SDL_ASSERTION_ABORT;
|
||||||
SDL_Window *window;
|
SDL_Window *window;
|
||||||
|
@ -150,7 +156,8 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
|
||||||
return SDL_ASSERTION_ABORT;
|
return SDL_ASSERTION_ABORT;
|
||||||
}
|
}
|
||||||
SDL_snprintf(message, SDL_MAX_LOG_MESSAGE,
|
SDL_snprintf(message, SDL_MAX_LOG_MESSAGE,
|
||||||
"Assertion failure at %s (%s:%d), triggered %u %s:\r\n '%s'",
|
"Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE
|
||||||
|
" '%s'",
|
||||||
data->function, data->filename, data->linenum,
|
data->function, data->filename, data->linenum,
|
||||||
data->trigger_count, (data->trigger_count == 1) ? "time" : "times",
|
data->trigger_count, (data->trigger_count == 1) ? "time" : "times",
|
||||||
data->condition);
|
data->condition);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue