mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] cleanup debug output
This commit is contained in:
parent
c4bf992c0c
commit
b7ca3d7e37
@ -1200,9 +1200,9 @@ static int lg_run()
|
|||||||
// warn about using FPS display until we can fix the font rendering to prevent lag spikes
|
// warn about using FPS display until we can fix the font rendering to prevent lag spikes
|
||||||
if (params.showFPS)
|
if (params.showFPS)
|
||||||
{
|
{
|
||||||
DEBUG_WARN("================================================================================");
|
DEBUG_BREAK();
|
||||||
DEBUG_WARN("WARNING: The FPS display causes microstutters, this is a known issue" );
|
DEBUG_WARN("WARNING: The FPS display causes microstutters, this is a known issue" );
|
||||||
DEBUG_WARN("================================================================================");
|
DEBUG_BREAK();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
||||||
@ -1443,6 +1443,10 @@ static int lg_run()
|
|||||||
SDL_SetHintWithPriority(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1", SDL_HINT_OVERRIDE);
|
SDL_SetHintWithPriority(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1", SDL_HINT_OVERRIDE);
|
||||||
SDL_SetEventFilter(eventFilter, NULL);
|
SDL_SetEventFilter(eventFilter, NULL);
|
||||||
|
|
||||||
|
// wait for startup to complete so that any error messages below are output at
|
||||||
|
// the end of the output
|
||||||
|
lgWaitEvent(e_startup, TIMEOUT_INFINITE);
|
||||||
|
|
||||||
LGMP_STATUS status;
|
LGMP_STATUS status;
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
@ -1463,9 +1467,11 @@ static int lg_run()
|
|||||||
memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) != 0 ||
|
memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) != 0 ||
|
||||||
udata->version != KVMFR_VERSION)
|
udata->version != KVMFR_VERSION)
|
||||||
{
|
{
|
||||||
|
DEBUG_BREAK();
|
||||||
DEBUG_ERROR("The host application is not compatible with this client");
|
DEBUG_ERROR("The host application is not compatible with this client");
|
||||||
DEBUG_ERROR("Expected KVMFR version %d\n", KVMFR_VERSION);
|
DEBUG_ERROR("Expected KVMFR version %d", KVMFR_VERSION);
|
||||||
DEBUG_ERROR("This is not a Looking Glass error, do not report this");
|
DEBUG_ERROR("This is not a Looking Glass error, do not report this");
|
||||||
|
DEBUG_BREAK();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
#define DEBUG_PRINT(type, fmt, ...) do {fprintf(stderr, "%" PRId64 " " type " %20s:%-4u | %-30s | " fmt "\n", microtime(), STRIPPATH(__FILE__), __LINE__, __FUNCTION__, ##__VA_ARGS__);} while (0)
|
#define DEBUG_PRINT(type, fmt, ...) do {fprintf(stderr, "%" PRId64 " " type " %20s:%-4u | %-30s | " fmt "\n", microtime(), STRIPPATH(__FILE__), __LINE__, __FUNCTION__, ##__VA_ARGS__);} while (0)
|
||||||
|
|
||||||
|
#define DEBUG_BREAK() DEBUG_PRINT("[ ]", "%s", "================================================================================")
|
||||||
#define DEBUG_INFO(fmt, ...) DEBUG_PRINT("[I]", fmt, ##__VA_ARGS__)
|
#define DEBUG_INFO(fmt, ...) DEBUG_PRINT("[I]", fmt, ##__VA_ARGS__)
|
||||||
#define DEBUG_WARN(fmt, ...) DEBUG_PRINT("[W]", fmt, ##__VA_ARGS__)
|
#define DEBUG_WARN(fmt, ...) DEBUG_PRINT("[W]", fmt, ##__VA_ARGS__)
|
||||||
#define DEBUG_ERROR(fmt, ...) DEBUG_PRINT("[E]", fmt, ##__VA_ARGS__)
|
#define DEBUG_ERROR(fmt, ...) DEBUG_PRINT("[E]", fmt, ##__VA_ARGS__)
|
||||||
|
Loading…
Reference in New Issue
Block a user