We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3323

Summary: SDL_LogOutput prints message twice on Windows when linked with libc
Product: SDL Reporter: Simon Hug <chli.hug>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   
Attachments: Patch that disables fprintf in SDL_LogOuput on Windows.

Description Simon Hug 2016-05-07 18:15:48 UTC
Created attachment 2449 [details]
Patch that disables fprintf in SDL_LogOuput on Windows.

If SDL2 is compiled with HAVE_LIBC on Windows, the SDL_LogOutput function has two ways of printing a message. WriteConsole and fprintf. Since the former handles unicode, the latter can probably be deactivated.

The attached patch disables the fprintf code on Windows.
Comment 1 Sam Lantinga 2016-10-01 19:28:51 UTC
I opted to disable WriteConsole() if SDL is compiled with HAVE_LIBC. Thanks!
https://hg.libsdl.org/SDL/rev/a644712b2fb2