Change precedence of casts
This commit is contained in:
@@ -50,6 +50,12 @@ window_procedure :: (hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM): LRE
|
||||
else;; return DefWindowProcW(hwnd, msg, wparam, lparam)
|
||||
|
||||
_gcvt :: #foreign (value: F64, digits: int, buffer: *char): *char
|
||||
print_float :: (value: F64)
|
||||
buff: [100]char
|
||||
_gcvt(value, 10, &buff[0])
|
||||
OutputDebugStringA("\n")
|
||||
OutputDebugStringA(&buff[0])
|
||||
|
||||
WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nShowCmd: int): int
|
||||
if good_scheduling := false, timeBeginPeriod(1) == TIMERR_NOERROR
|
||||
good_scheduling = true
|
||||
@@ -99,9 +105,7 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
|
||||
|
||||
|
||||
frame_time := time() - frame_start_time
|
||||
_gcvt(frame_time, 10, buff)
|
||||
OutputDebugStringA("\n")
|
||||
OutputDebugStringA(buff)
|
||||
print_float(frame_time)
|
||||
if frame_time < requested_time_per_frame
|
||||
if good_scheduling
|
||||
time_to_sleep := (requested_time_per_frame - frame_time) * 1000
|
||||
|
||||
@@ -47,7 +47,7 @@ release :: (m: *Memory)
|
||||
|
||||
print :: (string: String16)
|
||||
handle := GetStdHandle(STD_OUTPUT_HANDLE)
|
||||
WriteConsoleW(handle, (string.str)->*void, string.len->DWORD, 0, 0)
|
||||
WriteConsoleW(handle, string.str->*void, string.len->DWORD, 0, 0)
|
||||
|
||||
performance_frequency: F64
|
||||
time :: (): F64
|
||||
|
||||
Reference in New Issue
Block a user