mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
Merge branch 'dev' into refactor/untangle-assets-mess
This commit is contained in:
commit
dd46307e4a
|
|
@ -468,8 +468,8 @@ float C_4JInput::GetJoypadStick_LX(int /*iPad*/, bool /*bCheckMenuDisplay*/) {
|
||||||
float C_4JInput::GetJoypadStick_LY(int /*iPad*/, bool /*bCheckMenuDisplay*/) {
|
float C_4JInput::GetJoypadStick_LY(int /*iPad*/, bool /*bCheckMenuDisplay*/) {
|
||||||
if (!s_mouseLocked) return 0.0f;
|
if (!s_mouseLocked) return 0.0f;
|
||||||
float v = 0.0f;
|
float v = 0.0f;
|
||||||
if (KDown(GLFW_KEY_W)) v -= 1.0f; // W = forward = negative Y on consoles
|
if (KDown(GLFW_KEY_W)) v += 1.0f; // W = forward = negative Y on consoles
|
||||||
if (KDown(GLFW_KEY_S)) v += 1.0f;
|
if (KDown(GLFW_KEY_S)) v -= 1.0f;
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,9 @@ __int64 System::currentTimeMillis()
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
long long unix_time = tv.tv_sec;
|
// Convert to milliseconds since unix epoch instead of windows file time
|
||||||
long long file_time = (unix_time + 11644473600LL) * 10000000LL + tv.tv_usec * 10;
|
// time is expecting calculation to be between 10-30 ms.
|
||||||
|
return (int64_t)tv.tv_sec * 1000LL + tv.tv_sec / 1000;
|
||||||
return file_time;
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
SYSTEMTIME UTCSysTime;
|
SYSTEMTIME UTCSysTime;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue