Fix DPI
This commit is contained in:
@@ -14,7 +14,6 @@ Raymarcher_Update :: ()
|
|||||||
forward := Vec3{0, 0, -1}
|
forward := Vec3{0, 0, -1}
|
||||||
side := Vec3_Normalize(Vec3_Cross(forward, up))
|
side := Vec3_Normalize(Vec3_Cross(forward, up))
|
||||||
|
|
||||||
bug := Vec3_Dot(side, forward, d, e)
|
|
||||||
Xf := 1 / X->F32
|
Xf := 1 / X->F32
|
||||||
Yf := 1 / Y->F32
|
Yf := 1 / Y->F32
|
||||||
ratio := X->F32 / 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
|
if good_scheduling := false, timeBeginPeriod(1) == TIMERR_NOERROR
|
||||||
good_scheduling = true
|
good_scheduling = true
|
||||||
|
|
||||||
|
dpi_aware_set := SetProcessDPIAware()
|
||||||
|
Assert(dpi_aware_set != 0)
|
||||||
|
|
||||||
arena: Arena
|
arena: Arena
|
||||||
|
|
||||||
window_name := StringToString16(&arena, "Have a wonderful day! 你好世界 ")
|
window_name := StringToString16(&arena, "Have a wonderful day! 你好世界 ")
|
||||||
|
|||||||
@@ -5,16 +5,17 @@ MSG :: struct;; hwnd: HWND; message: UINT; wParam: WPARAM; lParam: L
|
|||||||
POINT :: struct;; x: LONG; y: LONG
|
POINT :: struct;; x: LONG; y: LONG
|
||||||
LPMSG :: *MSG
|
LPMSG :: *MSG
|
||||||
|
|
||||||
PostQuitMessage :: #foreign (nExitCode: int)
|
PostQuitMessage :: #foreign (nExitCode: int)
|
||||||
DefWindowProcW :: #foreign (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT
|
DefWindowProcW :: #foreign (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT
|
||||||
GetDC :: #foreign (hWnd: HWND): HDC
|
GetDC :: #foreign (hWnd: HWND): HDC
|
||||||
CreateWindowA :: #foreign (dwExStyle: DWORD, lpClassName: *char, lpWindowName: *char, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: *void): HWND
|
CreateWindowA :: #foreign (dwExStyle: DWORD, lpClassName: *char, lpWindowName: *char, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: *void): HWND
|
||||||
CreateWindowExW :: #foreign (dwExStyle: DWORD, lpClassName: LPCWSTR, lpWindowName: LPCWSTR, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: LPVOID): HWND
|
CreateWindowExW :: #foreign (dwExStyle: DWORD, lpClassName: LPCWSTR, lpWindowName: LPCWSTR, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: LPVOID): HWND
|
||||||
RegisterClassW :: #foreign (lpWndClass: *WNDCLASSW): ATOM
|
RegisterClassW :: #foreign (lpWndClass: *WNDCLASSW): ATOM
|
||||||
ShowWindow :: #foreign (hWnd: HWND, nCmdShow: int): BOOL
|
ShowWindow :: #foreign (hWnd: HWND, nCmdShow: int): BOOL
|
||||||
PeekMessageW :: #foreign (lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMs: UINT):BOOL
|
PeekMessageW :: #foreign (lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMs: UINT):BOOL
|
||||||
TranslateMessage:: #foreign (lpMsg: *MSG): BOOL
|
TranslateMessage :: #foreign (lpMsg: *MSG): BOOL
|
||||||
DispatchMessageW:: #foreign (lpMsg: *MSG): LRESULT
|
DispatchMessageW :: #foreign (lpMsg: *MSG): LRESULT
|
||||||
|
SetProcessDPIAware:: #foreign (): BOOL
|
||||||
|
|
||||||
|
|
||||||
WM_NULL :: 0x0000; WM_CREATE :: 0x0001; WM_DESTROY :: 0x0002; WM_MOVE :: 0x0003; WM_SIZE :: 0x0005
|
WM_NULL :: 0x0000; WM_CREATE :: 0x0001; WM_DESTROY :: 0x0002; WM_MOVE :: 0x0003; WM_SIZE :: 0x0005
|
||||||
|
|||||||
Reference in New Issue
Block a user