mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
fix manabatery, fix timer clock skew, check queue when mouse move, wasd control
This commit is contained in:
parent
05a2803b2b
commit
56cac26206
17 changed files with 102 additions and 60 deletions
|
@ -7,7 +7,10 @@
|
|||
#include "error.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
static std::uint32_t gtick = get_game_tick_count();
|
||||
|
@ -15,13 +18,19 @@ void send_log_impl(const char *format, ...) {
|
|||
va_list args;
|
||||
int task = q_current_task();
|
||||
char buff2[1000];
|
||||
va_start(args, format);
|
||||
char buff[1000];
|
||||
va_start(args, format);
|
||||
auto reltik = get_game_tick_count() - gtick;
|
||||
double sec = reltik * 0.001;
|
||||
std::cerr << sec << "[" << task << "]";
|
||||
vsnprintf(buff2,1000,format, args);
|
||||
std::cerr << buff2 << std::endl;
|
||||
va_end(args);
|
||||
snprintf(buff, sizeof(buff), "%f [%d] %s\r\n", sec, task, buff2);
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
OutputDebugStringA(buff);
|
||||
#else
|
||||
std::cerr << buff;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue