bemanitools/src/main/d3d9-monitor-check/print-console.h
icex2 d781905d83
feat: Extend monitor check tool, vsync and response time tests (#331)
Adding two more tests that have been proven very useful
for debugging monitor issues that caused problems with IIDX.

The vsync test flickers a text snippet between red and cyan on
every even and uneven frame. If vsync works correctly, the text
appears grey to the human eye. If there are issues like re-displaying
a previous frame or a dropped frame, this appears as the text
rendering red or cyan.

The response time test scrolls two simple blocks/lines vertically
to check if they creating ghosting/smearing on the display.

The tool now supports an interactive and command line mode.

Interactive mode is useful for running different tests on the setup
while the command line mode can be used to ran these tests
with fixed parameters and for a fixed amount of time, e.g. in a shell
script, for automation purpose.

The tool still has a few obvious imperfections like scaling issues on
different resolutions. Considering the basic functionality is given,
further improvements can follow in future iterations.
2025-02-19 19:38:31 +01:00

23 lines
575 B
C

#ifndef PRINT_CONSOLE_H
#define PRINT_CONSOLE_H
#include <stdio.h>
#include "util/winerr.h"
#define printf_out(fmt, ...) \
fprintf(stdout, fmt, ##__VA_ARGS__)
#define printf_err(fmt, ...) \
fprintf(stderr, fmt, ##__VA_ARGS__)
#define printfln_out(fmt, ...) \
fprintf(stdout, fmt "\n", ##__VA_ARGS__)
#define printfln_err(fmt, ...) \
fprintf(stderr, fmt "\n", ##__VA_ARGS__)
#define printfln_winerr(fmt, ...) \
char *winerr = util_winerr_format_last_error_code(); \
fprintf(stderr, fmt ": %s\n", ##__VA_ARGS__, winerr); \
free(winerr);
#endif