mirror of
https://github.com/holub/mame
synced 2025-06-03 19:36:26 +03:00
Windows OSD / stdout/stderr output buffering [qmc2]
This commit is contained in:
parent
49dad77354
commit
b3b3257747
@ -45,6 +45,7 @@
|
|||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
#include <io.h>
|
||||||
|
|
||||||
// standard C headers
|
// standard C headers
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -454,6 +455,12 @@ const options_entry windows_options::s_option_entries[] =
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
// use small output buffers on non-TTYs (i.e. pipes)
|
||||||
|
if (!isatty(fileno(stdout)))
|
||||||
|
setvbuf(stdout, (char *) NULL, _IOFBF, 64);
|
||||||
|
if (!isatty(fileno(stderr)))
|
||||||
|
setvbuf(stderr, (char *) NULL, _IOFBF, 64);
|
||||||
|
|
||||||
// initialize common controls
|
// initialize common controls
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user