feat(gx): handle custom window proc in device creation

This commit is contained in:
fallenoak 2023-03-14 16:49:01 -05:00 committed by GitHub
parent de0050d111
commit 9ccd1884f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 11 deletions

View file

@ -357,7 +357,9 @@ LRESULT CGxDeviceD3d::WindowProcD3d(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
break;
}
// TODO
if (device && device->m_windowProc) {
return device->m_windowProc(hWnd, uMsg, wParam, lParam);
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
@ -428,7 +430,7 @@ int32_t CGxDeviceD3d::CreatePoolAPI(CGxPool* pool) {
return 1;
}
int32_t CGxDeviceD3d::DeviceCreate(long (*windowProc)(void*, uint32_t, uint32_t, long), const CGxFormat& format) {
int32_t CGxDeviceD3d::DeviceCreate(int32_t (*windowProc)(void* window, uint32_t message, uint32_t wparam, int32_t lparam), const CGxFormat& format) {
this->m_ownhwnd = 1;
// TODO gamma ramp