Fix DPI
This commit is contained in:
@@ -14,7 +14,6 @@ Raymarcher_Update :: ()
|
||||
forward := Vec3{0, 0, -1}
|
||||
side := Vec3_Normalize(Vec3_Cross(forward, up))
|
||||
|
||||
bug := Vec3_Dot(side, forward, d, e)
|
||||
Xf := 1 / X->F32
|
||||
Yf := 1 / Y->F32
|
||||
ratio := X->F32 / Y->F32
|
||||
@@ -103,6 +102,9 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
|
||||
if good_scheduling := false, timeBeginPeriod(1) == TIMERR_NOERROR
|
||||
good_scheduling = true
|
||||
|
||||
dpi_aware_set := SetProcessDPIAware()
|
||||
Assert(dpi_aware_set != 0)
|
||||
|
||||
arena: Arena
|
||||
|
||||
window_name := StringToString16(&arena, "Have a wonderful day! 你好世界 ")
|
||||
|
||||
@@ -15,6 +15,7 @@ ShowWindow :: #foreign (hWnd: HWND, nCmdShow: int): BOOL
|
||||
PeekMessageW :: #foreign (lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMs: UINT):BOOL
|
||||
TranslateMessage :: #foreign (lpMsg: *MSG): BOOL
|
||||
DispatchMessageW :: #foreign (lpMsg: *MSG): LRESULT
|
||||
SetProcessDPIAware:: #foreign (): BOOL
|
||||
|
||||
|
||||
WM_NULL :: 0x0000; WM_CREATE :: 0x0001; WM_DESTROY :: 0x0002; WM_MOVE :: 0x0003; WM_SIZE :: 0x0005
|
||||
|
||||
Reference in New Issue
Block a user